Submit.php 985 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. *
  4. * Cube Framework $Id$ Di8LQcc0lj3BsyXteZNW5C60iuAQTRinwVHNVqXXWZU=
  5. *
  6. * @link http://codecu.be/framework
  7. * @copyright Copyright (c) 2014 CodeCube SRL
  8. * @license http://codecu.be/framework/license Commercial License
  9. *
  10. * @version 1.3
  11. */
  12. /**
  13. * submit form element generator class
  14. */
  15. namespace Cube\Form\Element;
  16. use Cube\Form\Element;
  17. class Submit extends Element
  18. {
  19. /**
  20. *
  21. * type of element - override the variable from the parent class
  22. *
  23. * @var string
  24. */
  25. protected $_element = 'submit';
  26. /**
  27. *
  28. * class constructor
  29. *
  30. * @param string $name
  31. */
  32. public function __construct($name)
  33. {
  34. parent::__construct($this->_element, $name);
  35. }
  36. /**
  37. *
  38. * get translated submit element value
  39. *
  40. * @return string
  41. */
  42. public function getValue()
  43. {
  44. $value = parent::getValue();
  45. return $this->getTranslate()->_($value);
  46. }
  47. }