protected function getContentForm(Content $contentObject = null, array $imageOptions = array()) { if (is_null($contentObject)) { $contentObject = new Content(); } return $this->createFormBuilder($contentObject)->add('name')->add('title')->add('file', LegacyFormHelper::getType('Symfony\\Cmf\\Bundle\\MediaBundle\\Form\\Type\\ImageType'), array_merge(array('required' => false, 'label' => 'Image'), $imageOptions))->getForm(); }
protected function getContentForm(Content $contentObject = null) { $is_new = is_null($contentObject); if ($is_new) { $contentObject = new Content(); } return $this->createFormBuilder($contentObject)->add('name')->add('title')->add('file', LegacyFormHelper::getType('Symfony\\Cmf\\Bundle\\MediaBundle\\Form\\Type\\FileType'), array('required' => $is_new))->getForm(); }
/** * {@inheritdoc} */ public function getParent() { return LegacyFormHelper::getType('Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType'); }