12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- namespace Cube\Form\Element;
- use Cube\Form\Element;
- class Button extends Element
- {
-
- protected $_element = 'button';
-
- public function __construct($name)
- {
- parent::__construct($this->_element, $name);
- }
-
- public function getValue()
- {
- $value = parent::getValue();
- return $this->getTranslate()->_($value);
- }
-
- public function render()
- {
- $value = $this->getValue();
- return '<button type="' . $this->_type . '" name="' . $this->_name . '" '
- . $this->renderAttributes() . '>'
- . $value
- . '</button>';
- }
- }
|