This file contains hidden or 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 | |
| // ... | |
| $qb->add('where', 'x.date = :date') | |
| ->setParameter('date', new \DateTime('+2 days')); | |
| // ... |
This file contains hidden or 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
| <!-- | |
| given: | |
| params = array( | |
| 'color' => 'black,blue', | |
| 'shape' => 'round', | |
| 'size' => 'l,xl', | |
| ); | |
| --> |
This file contains hidden or 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 MyProject\MyBundle\Twig\Extension; | |
| class MyExtension extends \Twig_Extension | |
| { | |
| public function getFilters() | |
| { | |
| return array( | |
| 'toggle' => new \Twig_Filter_Method($this, 'doToggleFilter'), |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8" ?> | |
| <container xmlns="http://symfony.com/schema/dic/services" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | |
| <parameters> | |
| <parameter key="my.twig.class">MyProject\MyBundle\Twig\Extension\MyExtension</parameter> | |
| </parameters> |
This file contains hidden or 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 MyProject\MyBundle\DependencyInjection; | |
| use Symfony\Component\Config\FileLocator; | |
| use Symfony\Component\HttpKernel\DependencyInjection\Extension; | |
| use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; | |
| use Symfony\Component\DependencyInjection\ContainerBuilder; | |
| class MyExtension extends Extension |
This file contains hidden or 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 MyProject\MyBundle\Security; | |
| use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; | |
| use Symfony\Component\Security\Core\Exception\UnsupportedUserException; | |
| use Symfony\Component\Security\Core\User\UserProviderInterface; | |
| use Symfony\Component\Security\Core\User\UserInterface; | |
| use \Facebook; | |
| use \FacebookApiException; |
This file contains hidden or 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
| security: | |
| factories: | |
| - "%kernel.root_dir%/../src/FOS/FacebookBundle/Resources/config/security_factories.xml" | |
| providers: | |
| fos_facebook: | |
| id: fos_facebook.user_provider | |
| firewalls: | |
| facebook_app: |
This file contains hidden or 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 MyProject\MyBundle\Entity; | |
| use FOS\UserBundle\Entity\User as BaseUser; | |
| /** | |
| * @orm:Entity | |
| */ | |
| class User extends BaseUser |
This file contains hidden or 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 | |
| // you can not enable MyPlugin from MyPlugin! | |
| // but you can enable AnotherPlugin from MyPlugin. | |
| class MyPluginConfiguration extendssfPluginConfiguration | |
| { | |
| public function initialize() | |
| { | |
| $this->configuration->enablePlugins(array('AnotherPlugin')); |
This file contains hidden or 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 | |
| // ... | |
| protected function getSecurity_Authentication_ManagerService() | |
| { | |
| $a = $this->get('fos_facebook.api'); | |
| return $this->services['security.authentication.manager'] = new \Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager(array( | |
| 0 => new \FOS\FacebookBundle\Security\Authentication\Provider\FacebookProvider($a, $this->get('fos_facebook.user_provider'), new \Symfony\Component\Security\Core\User\UserChecker()), |