$options); } if (!isset($options['ignore'])) { $options['ignore'] = true; } parent::__construct($spec, $options); } /** * Return label * * If no label is present, returns the currently set name. * * If a translator is present, returns the translated label. * * @return string */ public function getLabel() { $value = parent::getLabel(); if (null === $value) { $value = $this->getName(); if (null !== ($translator = $this->getTranslator())) { return $translator->translate($value); } } return $value; } /** * Has this submit button been selected? * * @return bool */ public function isChecked() { $value = $this->getValue(); if (empty($value)) { return false; } if ($value != $this->getLabel()) { return false; } return true; } /** * Default decorators * * Uses only 'Submit' and 'DtDdWrapper' decorators by default. * * @return Zend_Form_Element_Submit */ public function loadDefaultDecorators() { if ($this->loadDefaultDecoratorsIsDisabled()) { return $this; } $decorators = $this->getDecorators(); if (empty($decorators)) { $this->addDecorator('Tooltip') ->addDecorator('ViewHelper') ->addDecorator('DtDdWrapper'); } return $this; } }