Source of file TranslationType.php
Size: 1,223 Bytes - Last Modified: 2013-07-17T08:22:21+02:00
/home/theseer/Downloads/Symfony/vendor/symfony/symfony/src/Symfony/Bridge/Propel1/Form/Type/TranslationType.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 | <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Propel1\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Bridge\Propel1\Form\EventListener\TranslationFormListener; /** * Translation type class * * @author Patrick Kaufmann */ class TranslationType extends AbstractType { /** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->addEventSubscriber( new TranslationFormListener($options['columns'], $options['data_class']) ); } /** * {@inheritdoc} */ public function getName() { return 'propel1_translation'; } /** * {@inheritdoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setRequired(array( 'data_class', 'columns' )); } } |