Elcodi\Admin\PageBundle\Form\Type\BlogPostType::buildForm PHP Method

buildForm() public method

Buildform function
public buildForm ( Symfony\Component\Form\FormBuilderInterface $builder, array $options )
$builder Symfony\Component\Form\FormBuilderInterface the formBuilder
$options array the options for this form
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('title', 'text', ['required' => true, 'label' => 'title'])->add('path', 'text', ['required' => true, 'label' => 'path'])->add('type', 'hidden', ['required' => true, 'data' => ElcodiPageTypes::TYPE_BLOG_POST])->add('content', 'textarea', ['required' => true, 'label' => 'content'])->add('publicationDate', 'date', ['required' => true, 'widget' => 'single_text', 'format' => 'yyyy-MM-dd', 'label' => 'Publication Date'])->add('metaTitle', 'text', ['required' => false, 'label' => 'Metatitle'])->add('metaDescription', 'text', ['required' => false, 'label' => 'Metadescription'])->add('metaKeywords', 'text', ['required' => false, 'label' => 'Metakeywords'])->add('enabled', 'checkbox', ['required' => false, 'label' => 'enabled']);
        $builder->addEventSubscriber($this->getEntityTranslatorFormEventListener());
    }