Description.php 1018 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\Core\UI\Traits;
  3. /**
  4. * Description related functions
  5. *
  6. * @autor ThurData <info@thurdata.ch>
  7. */
  8. trait Description
  9. {
  10. protected $description = 'description';
  11. protected $raw = false;
  12. protected $allowHtmlTags = false;
  13. public function setDescription($description)
  14. {
  15. $this->description = $description;
  16. return $this;
  17. }
  18. public function getDescription()
  19. {
  20. return $this->description;
  21. }
  22. public function isRaw()
  23. {
  24. return $this->raw;
  25. }
  26. public function setRaw($raw)
  27. {
  28. $this->raw = (bool) $raw;
  29. return $this;
  30. }
  31. public function allowHtmlTags()
  32. {
  33. $this->allowHtmlTags = true;
  34. return $this;
  35. }
  36. public function disallowHtmlTags()
  37. {
  38. $this->allowHtmlTags = false;
  39. return $this;
  40. }
  41. public function isHtmlTagsAllowed()
  42. {
  43. return $this->allowHtmlTags;
  44. }
  45. }