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 friendMessageAction() | |
{ | |
$form = $this->container->get('form.factory')->create('acme_friend_message'); | |
$form = $form->createView(); | |
return compact('form'); | |
} |
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
acme.form.friend_message: | |
class: Acme\WhateverBundle\FormType\FriendMessageType | |
arguments: [@acme.friend_message.form_listener] | |
tags: | |
- { name: form.type, alias: acme_friend_message} | |
acme.friend_message.form_listener: | |
class: Acme\WhateverBundle\FormSubscriber\UserListener | |
arguments: [@form.factory, @security.context] |
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 Acme\WhateverBundle\FormSubscriber; | |
use Symfony\Component\Form\Event\DataEvent; | |
use Symfony\Component\Form\FormFactoryInterface; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\Form\FormEvents; | |
use Doctrine\ODM\MongoDB\DocumentRepository; | |
use Symfony\Component\Security\Core\SecurityContext; |
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 Acme\WhateverBundle\FormType; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
use Acme\WhateverBundle\FormSubscriber\UserListener; | |
class FriendMessageFormType extends AbstractType | |
{ |
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
namespace Acme\DemoBundle\Form\Type; | |
<?php | |
use Symfony\Component\Form\AbstractType | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Acme\DemoBundle\Form\EventListener\AddNameFieldSubscriber; | |
class ProductType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ |
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
{ | |
# List of all repos we want to clone. (No version number required) because we DL ALL versions | |
"require": [ | |
"symfony/symfony-standard" | |
], | |
# the folder that will hold all of the cloned repos | |
"repodir":"packages", | |
# the satis config file to update with all the info | |
"satisconfig":"satis.json" | |
} |
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
Form.Views.SomeView = Backbone.View.extend({ | |
events: { | |
'keypress input': 'submitIfPressedEnter' | |
}, | |
/** | |
* Transforms an address to GPS coordinates | |
*/ | |
submitIfPressedEnter: function(event){ |
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 Acme\CommonBundle\Form\Type; | |
class GeoPointType extends AbstractType | |
{ | |
public function __construct($map) | |
{ | |
$this->map = $map->get('ivory_google_map.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
<?xml version="1.0" ?> | |
<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="khepin_user_validator.pointcut.class">Khepin\UserValidatorBundle\Aop\Pointcut</parameter> | |
<parameter key="khepin_user_validator.interceptor.class">Khepin\UserValidatorBundle\Aop\Interceptor</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 Khepin\UserValidatorBundle\Aop; | |
use CG\Proxy\MethodInterceptorInterface; | |
use CG\Proxy\MethodInvocation; | |
use Symfony\Component\Security\Core\SecurityContextInterface; | |
use Doctrine\Common\Annotations\Reader; | |
use Symfony\Component\Validator\Validator; | |
use Symfony\Component\HttpFoundation\Session\Session; | |
use Symfony\Bundle\FrameworkBundle\Routing\Router; |