我有以下代碼段, 在MyClass的,我已設置裝飾變量,如何設置裝飾器輸入類型文件中的元素?
public $testDecorators = array(
'ViewHelper',
'Errors',
array('Description', array('escape' => false, 'tag' => '', 'placement' => 'append')),
array(array('data' => 'HtmlTag'), array('tag' => 'div', 'class' => 'itemR')),
array('Label', array('tag' => 'div', 'class' => 'itemL')
),
array('HtmlTag', array('tag' => 'div', 'class' => 'itemcontent'))
);
在功能的CreateForm,
....
$cover_image = new Zend_Form_Element_File('cover_test', array(
'label' => 'Cover Test:',
'value' => '',
'class' => 'test',
'tabindex' => '5',
'required' => false,
'filters' => array('StringTrim'),
'decorators' => $this->testDecorators,
));
....
當我使用此裝飾,沒有什麼是顯示在我的形式,如果評論說'decorators' => $this->testDecorators,
形式未來罰款默認DD標籤,請幫我
謝謝非常有幫助 – mymotherland