Sylius\Bundle\ChannelBundle\Form\Type\ChannelType::buildForm PHP Method

buildForm() public method

public buildForm ( Symfony\Component\Form\FormBuilderInterface $builder, array $options )
$builder Symfony\Component\Form\FormBuilderInterface
$options array
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->addEventSubscriber(new AddCodeFormSubscriber())->add('name', TextType::class, ['label' => 'sylius.form.channel.name'])->add('description', TextareaType::class, ['label' => 'sylius.form.channel.description', 'required' => false])->add('enabled', CheckboxType::class, ['label' => 'sylius.form.channel.enabled', 'required' => false])->add('hostname', TextType::class, ['label' => 'sylius.form.channel.hostname', 'required' => false])->add('color', TextType::class, ['label' => 'sylius.form.channel.color', 'required' => false]);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('taxonomies', 'sylius_taxonomy_choice', array('label' => 'sylius.form.channel.taxonomies', 'multiple' => true))->add('locales', 'sylius_locale_choice', array('label' => 'sylius.form.channel.locales', 'multiple' => true))->add('defaultLocale', 'sylius_locale_choice', array('label' => 'sylius.form.channel.locale_default'))->add('currencies', 'sylius_currency_choice', array('label' => 'sylius.form.channel.currencies', 'multiple' => true))->add('defaultCurrency', 'sylius_currency_choice', array('label' => 'sylius.form.channel.currency_default'))->add('shippingMethods', 'sylius_shipping_method_choice', array('label' => 'sylius.form.channel.shipping_methods', 'multiple' => true))->add('paymentMethods', 'sylius_payment_method_choice', array('label' => 'sylius.form.channel.payment_methods', 'multiple' => true));
 }
All Usage Examples Of Sylius\Bundle\ChannelBundle\Form\Type\ChannelType::buildForm