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
1. In twig, what do you use if you want to optimize the size of the generated HTML content? | |
a. spaceless | |
b. gzip | |
c. operators | |
the spaceless tag | |
answer is b | |
really ? | |
twig supports gzip ? | |
don't look up |
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
cilex/cilex 1.1.0 The PHP micro-framework for Command line tools based on the Symfony2 Components | |
cilex/console-service-provider 1.0.0 Console Service Provider | |
doctrine/annotations v1.2.0 Docblock Annotations Parser | |
doctrine/lexer v1.0 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. | |
dompdf/dompdf v0.6.1 DOMPDF is a CSS 2.1 compliant HTML to PDF converter | |
erusev/parsedown 1.0.1 Parser for Markdown. | |
jms/metadata 1.5.1 Class/method/property metadata management in PHP | |
jms/parser-lib 1.0.0 A library for easily creating recursive-descent parsers. | |
jms/serializer 0.16.0 Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML. | |
knpla |
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 Cwd\GenericBundle\Repository; | |
use Doctrine\Common\Persistence\Mapping\ClassMetadata; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use Gedmo\Exception\InvalidArgumentException; | |
use Gedmo\Tree\RepositoryUtils as GedmoRepositoryUtils; | |
class RepositoryUtils extends GedmoRepositoryUtils |
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 Dpanel\Bundle\AdminBundle\Forms; | |
use Cwd\GenericBundle\Doctrine\EntityRepository; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use JMS\DiExtraBundle\Annotation as DI; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
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
return array( | |
'controllers' => array( | |
'initializers' => array( | |
function ($instance, $serviceManager) { | |
if ($instance instanceof EntityManagerAwareInterface) { | |
if($serviceManager->has('doctrine.entitymanager.orm_default')) { | |
$instance->setEntityManager($serviceManager->get('doctrine.entitymanager.orm_default')); | |
} | |
} | |
[...] |
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 Admin; | |
return array( | |
'invokables' => array( | |
'serviceFactory' => 'cwdAdmin\Service\ServiceFactory', | |
), | |
'factories' => array( | |
'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', |
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
return array( | |
'factories' => array( | |
'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', | |
'default_cache' => function($sm) { | |
$cache = \Zend\Cache\StorageFactory::factory(array( | |
'adapter' => array( | |
'name' => 'apc', | |
'options' => array( | |
), | |
), |
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
class ShowMessages extends AbstractHelper | |
{ | |
/** | |
* FlashMessenger | |
* @var unknown_type | |
*/ | |
protected $_fm = NULL; | |
public function __construct(FlashMessenger $fm) | |
{ |
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 Admin\Form; | |
use Zend\Form\Element\Select; | |
class Agency extends Form { | |
public function __construct() | |
{ |
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
public function createAction() | |
{ | |
$service = $this->getService(); | |
$form = $service->getForm(); | |
$entity = $service->getEntity(); | |
$form->bind($entity); | |
if($this->request->isPost()) { | |
$mandator = $this->getEntityManager()->find('Admin\Entity\Mandator', $_POST['mandator_id']); //<--- should not be needed |
OlderNewer