Eccube\Form\Type\Admin\ProductType::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)
    {
        /**
         * @var ArrayCollection $arrCategory array of category
         */
        $arrCategory = $this->app['eccube.repository.category']->getList(null, true);
        $builder->add('class', 'admin_product_class', array('mapped' => false))->add('name', 'text', array('label' => '商品名', 'constraints' => array(new Assert\NotBlank())))->add('product_image', 'file', array('label' => '商品画像', 'multiple' => true, 'required' => false, 'mapped' => false))->add('description_detail', 'textarea', array('label' => '商品説明'))->add('description_list', 'textarea', array('label' => '商品説明(一覧)', 'required' => false))->add('Category', 'entity', array('class' => 'Eccube\\Entity\\Category', 'property' => 'NameWithLevel', 'label' => '商品カテゴリ', 'multiple' => true, 'mapped' => false, 'choices' => $arrCategory))->add('Tag', 'tag', array('required' => false, 'multiple' => true, 'expanded' => true, 'mapped' => false))->add('search_word', 'textarea', array('label' => "検索ワード", 'required' => false))->add('free_area', 'textarea', array('label' => 'サブ情報', 'required' => false))->add('Status', 'disp', array('constraints' => array(new Assert\NotBlank())))->add('note', 'textarea', array('label' => 'ショップ用メモ帳', 'required' => false))->add('tags', 'collection', array('type' => 'hidden', 'prototype' => true, 'mapped' => false, 'allow_add' => true, 'allow_delete' => true))->add('images', 'collection', array('type' => 'hidden', 'prototype' => true, 'mapped' => false, 'allow_add' => true, 'allow_delete' => true))->add('add_images', 'collection', array('type' => 'hidden', 'prototype' => true, 'mapped' => false, 'allow_add' => true, 'allow_delete' => true))->add('delete_images', 'collection', array('type' => 'hidden', 'prototype' => true, 'mapped' => false, 'allow_add' => true, 'allow_delete' => true));
    }