/** * Load default decorators * * @return IfwPsn_Vendor_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; }