Newscoop\GimmeBundle\Form\Type\ClientType::buildForm PHP Метод

buildForm() публичный Метод

public buildForm ( Symfony\Component\Form\FormBuilderInterface $builder, array $options )
$builder Symfony\Component\Form\FormBuilderInterface
$options array
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $transformer = new StringToArrayTransformer();
        $builder->add('name', null, array('label' => 'api.form.client.label.name'));
        $builder->add('publication', 'entity', array('class' => 'Newscoop\\Entity\\Publication', 'property' => 'name', 'query_builder' => function (EntityRepository $er) {
            return $er->createQueryBuilder('p')->orderBy('p.name', 'ASC');
        }, 'label' => 'api.form.client.label.publication'));
        $builder->add($builder->create('redirectUris', 'text', array('label' => 'api.form.client.label.redirectUris'))->addModelTransformer($transformer));
        $builder->add('trusted', 'checkbox', array('label' => 'api.form.client.label.trusted', 'required' => false));
        $builder->add('save', 'submit', array('attr' => array('class' => 'btn btn-success pull-right'), 'label' => 'api.form.client.label.save'));
    }