public function loadDefaultDecorators() { parent::loadDefaultDecorators(); $this->removeDecorator('Label'); $this->removeDecorator('HtmlTag'); $this->addDecorator('HtmlTag', array('tag' => 'span', 'class' => 'spanImg')); }
/** * Load default decorators * * @return Zend_Form_Element_File */ public function loadDefaultDecorators() { if ($this->loadDefaultDecoratorsIsDisabled()) { return $this; } parent::loadDefaultDecorators(); // This element needs the File decorator and not the ViewHelper decorator if (false !== $this->getDecorator('ViewHelper')) { $this->removeDecorator('ViewHelper'); } if (false === $this->getDecorator('File')) { // Add File decorator to the beginning $decorators = $this->getDecorators(); array_unshift($decorators, 'File'); $this->setDecorators($decorators); } return $this; }