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 | |
//$this->getUser()->getCandidates() returns an array of EUser entities | |
$entityChoiceListForm = $this->createForm('choice', null, array( | |
'choice_list' => new EntityChoiceList( | |
$this->get('doctrine')->getManager(), | |
'SSCoreBundle:EUser', | |
'name', | |
null, |
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 | |
/** | |
* @param Symfony\Component\HttpFoundation\Request $request | |
* @param Symfony\Component\HttpFoundation\ParameterBag $bag | |
*/ | |
function let($request, $bag) | |
{ | |
$bag->get('id')->willReturn(1); | |
$request->query = $bag; |
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 | |
use Symfony\Bundle\FrameworkBundle\Routing\Router; | |
use JMS\Serializer\EventDispatcher\Event; | |
use Symfony\Component\Form\Util\PropertyPath; | |
class SerializerListener | |
{ | |
private $router; | |
private $map; |
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
curl --user "docteurklein" -X POST \ | |
"https://api.github.com/repos/KnpLabs/KnpRadBundle/pulls" \ | |
-d'{"issue": 83, "head": "KnpLabs:bugfix/83-csrf-check-option", "base":"develop"}' |
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 | |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\DefinitionDecorator; | |
use Symfony\Component\DependencyInjection\Reference; | |
class SetServiceDecoratorPass implements CompilerPassInterface | |
{ | |
public function process(ContainerBuilder $container) |
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
{ | |
"id":"30", | |
"name":"app_article_list", | |
"javascript":null, | |
"stylesheet":null, | |
"raw_headers":null, | |
"title":"test seo", | |
"meta_description":"seo", | |
"meta_keyword":"seo", | |
"template_code":"article", |
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
sf sonata:page:render-block sonata.page.cms.page 30 10 | |
Block Information | |
> Id: 10 - type: sonata.block.service.text - name: title | |
>> content: "NEWS!" | |
>> template: "SonataBlockBundle:Block:block_core_text.html.twig" | |
>> code: "title" | |
BlockContext Information | |
>> use_cache: true | |
>> extra_cache_keys: [] |
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 | |
class SomeScreenSpec | |
{ | |
function it_should_definitly_allow_to_add_something_via_a_form() | |
{ | |
$this->mink->doSomeStuff()->and()->assertSomeStuff(); | |
} | |
} |
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 | |
public function process(ContainerBuilder $container) | |
{ | |
$factory = $container->findDefinition('app.doctrine.repository.factory'); | |
$repositories = []; | |
foreach ($container->findTaggedServiceIds('app.repository') as $id => $params) { | |
foreach ($params as $param) { | |
$repositories[$param['class']] = $id; |
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 PhpSpec\Iterator; | |
use PhpSpec\Wrapper\Collaborator as Base; | |
use Prophecy\Prophecy\ObjectProphecy; | |
use Prophecy\Promise\ReturnPromise; | |
class Collaborator extends Base | |
{ |