SubOption.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\Services\ConfigurableOptions\Models;
  3. use ThurData\Servers\KerioEmail\App\Services\ConfigurableOptions\Abstracts\AbstractSerialize;
  4. /**
  5. * Description of Option
  6. *
  7. * @autor ThurData <info@thurdata.ch>
  8. */
  9. class SubOption extends AbstractSerialize
  10. {
  11. /*
  12. * @var integer $configid
  13. */
  14. protected $configid;
  15. /*
  16. * @var string $name
  17. */
  18. protected $optionname;
  19. /*
  20. * @var string $name
  21. */
  22. protected $sortorder = 0;
  23. /*
  24. * @var string $name
  25. */
  26. protected $hidden = 0;
  27. /*
  28. * Alternative method to set required fields
  29. *
  30. * @param string $name
  31. */
  32. public function __construct($key, $name = null)
  33. {
  34. $this->optionname = $this->prepareName($key, $name);
  35. }
  36. /*
  37. * Set Option Name
  38. *
  39. * @param string $name
  40. *
  41. * @return object $this
  42. */
  43. public function setName($name)
  44. {
  45. $this->optionname = $name;
  46. return $this;
  47. }
  48. /*
  49. * Set Option order
  50. *
  51. * @param integer $sort
  52. *
  53. * @return object $this
  54. */
  55. public function setSort($sort)
  56. {
  57. $this->sortorder = $sort;
  58. return $this;
  59. }
  60. /*
  61. * Set Option hidden status
  62. *
  63. * @param integer $hidden
  64. *
  65. * @return object $this
  66. */
  67. public function setHidden($hidden)
  68. {
  69. $this->hidden = $hidden;
  70. return $this;
  71. }
  72. /*
  73. * Set Config option ID
  74. *
  75. * @param integer $configid
  76. *
  77. * @return object $this
  78. */
  79. public function setConfigid($configid)
  80. {
  81. $this->configid = $configid;
  82. return $this;
  83. }
  84. }