Text.php 857 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. *
  4. * Cube Framework $Id$ o216p6Rr4oZRd+D1/ykDKoxaBmNc7jGNJobMbnfDH5I=
  5. *
  6. * @link http://codecu.be/framework
  7. * @copyright Copyright (c) 2017 CodeCube SRL
  8. * @license http://codecu.be/framework/license Commercial License
  9. *
  10. * @version 1.9 [rev.1.9.01]
  11. */
  12. /**
  13. * text form element generator class
  14. */
  15. namespace Cube\Form\Element;
  16. use Cube\Form\Element;
  17. class Text extends Element
  18. {
  19. const TYPE = 'text';
  20. /**
  21. *
  22. * class constructor
  23. *
  24. * @param string $name
  25. */
  26. public function __construct($name)
  27. {
  28. parent::__construct(self::TYPE, $name);
  29. }
  30. /**
  31. *
  32. * renders the html form element
  33. * @1.9: force type = text
  34. *
  35. * @return string
  36. */
  37. public function render()
  38. {
  39. $this->setType(self::TYPE);
  40. return parent::render();
  41. }
  42. }