/** * Get value * * If element type is one of the button types, returns the label. * * @param Zend_Form_Element $element * @return string|null */ public function getValue($element) { if (!$element instanceof Zend_Form_Element) { return null; } foreach ($this->_buttonTypes as $type) { if ($element instanceof $type) { return $element->getLabel(); } } foreach ($this->_checkboxTypes as $type) { if ($element instanceof $type) { return $element->getCheckedValue(); } } return $element->getValue(); }