Skip to content

Instantly share code, notes, and snippets.

View johnwards's full-sized avatar

johnwards johnwards

  • Oxfordshire/Birmingham/London
View GitHub Profile
<?php
namespace Symfony\Tests\Component\Form\Renderer\Plugin;
use Symfony\Component\Form\Renderer\Plugin\FieldPlugin;
use Symfony\Component\Form\Renderer\DefaultRenderer;
use Symfony\Component\Form\FieldInterface;
class FieldPluginTest extends \PHPUnit_Framework_TestCase
<?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.
*/
<?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.
*/
services:
formbuilder.controller.form:
class: WhiteOctober\FormBuilderBundle\Controller\FormCRUDController
arguments: [@liip_view, @form.context, @request, @doctrine.odm.mongodb.document_manager, @session, @knplabs_paginator.adapter]
scope: request
<?php
namespace WhiteOctober\FormBuilderBundle\Document;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @mongodb:Document(collection="forms")
*/
class FormBuilder
<?php
namespace WhiteOctober\FormBuilderBundle\Form;
use Symfony\Component\Form\Config\FormConfig;
use Symfony\Component\Form\FieldInterface;
class FormBuilderFormConfig extends FormConfig
{
<?php
namespace WhiteOctober\FormBuilderBundle\Model;
use Symfony\Component\Serializer\Normalizer\NormalizableInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* Model\WhiteOctoberFormBuilderBundle\Form bundle document.
*/
<?php
namespace WhiteOctober\FormBuilderBundle\Normalizer;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
/**
* This handles unknown objects gracefully
*/
class noopNormalizer extends AbstractNormalizer
{
<?php
namespace WhiteOctober\FormBuilderBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class FormType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
<?php
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Constraints\NotBlank;
class Stub
{
protected static $data = array();
public function setData($data)