This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\ -f1` | |
sudo chmod +a "$APACHEUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs | |
sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs | |
or... | |
umask(0002) or umask(0000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> CREATE USER 'usuario'@'localhost' IDENTIFIED BY 'contraseña'; | |
mysql> GRANT ALL ON concerts.* TO 'usuario'@'localhost'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "doctrine/doctrine-fixtures-bundle": "dev-master", | |
"doctrine/data-fixtures": "dev-master" | |
} | |
Add to appKernel.php in register bundles: | |
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* User | |
* | |
* @ORM\Table(name="user") | |
* @ORM\Entity(repositoryClass="nemmi\WebBundle\Entity\UserRepository") | |
* | |
*/ | |
class User |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace nemmi\WebBundle\Entity; | |
use Doctrine\ORM\EntityRepository; | |
use Doctrine\ORM\NoResultException; | |
use Doctrine\ORM\Tools\Pagination\Paginator; | |
use Doctrine\ORM\AbstractQuery; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace nemmi\WebBundle\DataFixtures\ORM; | |
use Doctrine\Common\DataFixtures\AbstractFixture; | |
use Doctrine\Common\DataFixtures\FixtureInterface; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use nemmi\WebBundle\Entity\Concert; | |
use nemmi\WebBundle\Entity\User; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html.twig" %} | |
{% block title "Vista principal" %} | |
{% block body %} | |
Hola {{ user.name }} | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>{% block title %}Nemmi{% endblock %}</title> | |
{% block stylesheets %}{% endblock %} | |
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /> | |
</head> | |
<body> | |
{% block body %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% macro box(concert) %} | |
<div> | |
{% spaceless %} | |
<h2> | |
<span class='time'>{{ concert.time|date('d-m-Y, H:i') }}</span> | |
{{ concert.name | title}} | |
</h2> | |
{% endspaceless %} | |
<p class="place">{{ concert.place }}</p> | |
</div> |
OlderNewer