12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- /**
- *
- * Cube Framework $Id$ X9fLOT+grjxsYHCr0FoIEkvCAYu2c7/1BgFp+V36X+Y=
- *
- * @link http://codecu.be/framework
- * @copyright Copyright (c) 2015 CodeCube SRL
- * @license http://codecu.be/framework/license Commercial License
- *
- * @version 1.4
- */
- /**
- * creates a password element
- */
- namespace Cube\Form\Element;
- use Cube\Form\Element;
- class Password extends Element
- {
- /**
- *
- * type of element - override the variable from the parent class
- *
- * @var string
- */
- protected $_element = 'password';
- /**
- *
- * class constructor
- *
- * @param string $name
- */
- public function __construct($name)
- {
- parent::__construct($this->_element, $name);
- }
- /**
- *
- * renders the password form element
- * the element wont render the data resulted from a previous input
- *
- * @return string the html code of the element
- */
- public function render()
- {
- $multiple = ($this->getMultiple() === true) ? $this->_brackets : '';
- return $this->getPrefix() . ' '
- . '<input type="' . $this->_type . '" '
- . 'name="' . $this->_name . $multiple . '" '
- . $this->renderAttributes()
- . $this->_endTag . ' '
- . $this->getSuffix();
- }
- }
|