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 | |
.... | |
public function prePersist(LifecycleEventArgs $args) | |
{ | |
$entity = $args->getEntity(); | |
if (method_exists($entity, 'setCreatedBy') { | |
$user = $this->container->get('security.context')->getToken()->getUser(); | |
$entity->setCreatedBy($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 XXX\SearchBundle\Doctrine; | |
use Doctrine\ORM\Query\SqlWalker; | |
/** | |
* Replace LIKE with ILIKE | |
* Usage: $query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'XXX\SearchBundle\Doctrine\IlikeWalker'); | |
* | |
* @author Ziumin |
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 XXX\ToolkitBundle\Tests\Command; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
use Symfony\Component\Console\Tester\CommandTester; | |
use Symfony\Bundle\FrameworkBundle\Console\Application; | |
use XXX\ToolkitBundle\Command\CommonGenerateCommand; | |