/** * * @param <type> $pArtist = NULL * @return <type> */ public function __construct($pArtist = NULL) { if (is_null($pArtist)) { $pArtist = new Zupal_Media_Artists(); } parent::__construct($pArtist, new Zend_Config_Ini(dirname(__FILE__) . DS . 'Form.ini', 'fields')); foreach (Zupal_Media_Media::getInstance()->find_all() as $media) { $this->media_id->addMultiOption($media->identity(), $media->name); } }
public function __construct(Zupal_Content $pContent = NULL) { if (is_null($pContent)) { $pContent = new Zupal_Content(); } $ini_path = dirname(__FILE__) . DS . 'Form.ini'; $config = new Zend_Config_Ini($ini_path, 'fields'); $elements = $config->elements; parent::__construct($pContent, $config); $this->addDisplayGroup(array_keys($elements->toArray()), 'content', array('order' => -1, 'legend' => 'detail', 'style' => "width: 400px")); $this->getDisplayGroup('content')->removeDecorator('DtDdWrapper'); $root = Zend_Controller_Front::getInstance()->getBaseUrl() . DS . 'content' . DS . 'item'; $this->setMethod('post'); }