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
parameters: | |
wofb.webroot: %kernel.root_dir%/../web | |
wofb.uploaddir: /uploads | |
services: | |
fr.controllers.element: | |
class: FoodRisc\AccountAdminBundle\Controller\ContentTesterElementController | |
arguments: | |
- @service_container | |
- %wofb.webroot%%wofb.uploaddir% |
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 PlainType extends AbstractType | |
{ | |
public function getDefaultOptions(array $options) | |
{ | |
return array( | |
'read_only' => true, | |
); |
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 FoodRisc\AccountAdminBundle\Admin\Action; | |
use WhiteOctober\AdminBundle\Action\Action; | |
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
class WaveSendInvitationsAction extends Action | |
{ |
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 FoodRisc\AccountAdminBundle\Admin; | |
use Model\WhiteOctoberFormBuilderBundle\Form; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
use FoodRisc\AccountAdminBundle\Admin\Action\WaveSendInvitationsAction; | |
class WaveAdmin extends Admin |
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 FoodRisc\MainBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilder; | |
class AccountRegisterType extends AbstractType | |
{ | |
public function buildForm(FormBuilder $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
<?php | |
namespace Foo\AccountBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilder; | |
use Symfony\Component\Validator\Constraints\Callback; | |
class CreatePasswordFormType 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
{% block field_widget %} | |
{% spaceless %} | |
{% set type = type|default('text') %} | |
<input type="{{ type }}" {{ block('attributes') }} value="{{ value }}" class='field-{{ type }}'/> | |
{% endspaceless %} | |
{% endblock field_widget %} | |
{% block field_row %} | |
{% spaceless %} |
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 | |
$symfonyFormBuilder = $this->get('form.factory') | |
->createBuilder('form'); | |
//An array of elements | |
$elements = array(); | |
$symfonyFormBuilder->setAttribute('validation_constraint', new Callback(array("methods"=>array( | |
'validate' => function ($data, $context) use ($elements) { |
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 file is part of the Symfony package. | |
* | |
* (c) Fabien Potencier <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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\Validator\Mapping\ClassMetadata; | |
use Symfony\Component\Validator\Constraints\NotBlank; | |
class Stub | |
{ | |
protected static $data = array(); | |
public function setData($data) |