ExtendedInputField.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Fields;
  3. use ThurData\Servers\KerioEmail\Core\UI\Interfaces\AdminArea;
  4. use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
  5. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Text;
  6. /**
  7. *
  8. * Created by PhpStorm.
  9. * User: ThurData
  10. * Date: 08.11.19
  11. * Time: 10:32
  12. * Class ExtendedInputField
  13. */
  14. class ExtendedInputField extends Text implements AdminArea, ClientArea
  15. {
  16. protected $id = 'extendedInputField';
  17. protected $name = 'extendedInputField';
  18. protected $fieldType = self::TYPE_DEFAULT;
  19. const TYPE_PASSWORD = 'password';
  20. const TYPE_EMAIL = 'email';
  21. const TYPE_TEXT = 'text';
  22. const TYPE_NUMBER = 'number';
  23. const TYPE_DEFAULT = 'text';
  24. protected $rawDescription = null;
  25. /**
  26. * @return string
  27. */
  28. public function getFieldType()
  29. {
  30. return $this->fieldType;
  31. }
  32. /**
  33. * @param $fieldType
  34. * @return $this
  35. */
  36. public function setFieldType($fieldType)
  37. {
  38. $this->fieldType = $fieldType;
  39. return $this;
  40. }
  41. /**
  42. * @return null
  43. */
  44. public function getRawDescription()
  45. {
  46. return $this->rawDescription;
  47. }
  48. /**
  49. * @param $rawDescription
  50. * @return $this
  51. */
  52. public function setRawDescription($rawDescription)
  53. {
  54. $this->rawDescription = $rawDescription;
  55. return $this;
  56. }
  57. public function isRawDescription()
  58. {
  59. return $this->rawDescription !== null;
  60. }
  61. }