WidgetView.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. namespace ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Traits;
  3. // to do disable title
  4. /**
  5. * Title elements related functions
  6. *
  7. * @author Sławomir Miśkowicz <slawomir@modulesgarden.com>
  8. */
  9. trait WidgetView
  10. {
  11. protected $isViewHeader = true;
  12. protected $isViewFooter = true;
  13. protected $isViewTopBody = true;
  14. public function enabledViewHeader()
  15. {
  16. $this->isViewHeader = true;
  17. return $this;
  18. }
  19. public function disabledViewHeader()
  20. {
  21. $this->isViewHeader = false;
  22. return $this;
  23. }
  24. public function isViewHeader()
  25. {
  26. return $this->isViewHeader;
  27. }
  28. public function enabledViewFooter()
  29. {
  30. $this->isViewFooter = true;
  31. return $this;
  32. }
  33. public function disabledViewFooter()
  34. {
  35. $this->isViewFooter = false;
  36. return $this;
  37. }
  38. public function isViewFooter()
  39. {
  40. return $this->isViewFooter;
  41. }
  42. public function enabledViewTopBody()
  43. {
  44. $this->isViewTopBody = true;
  45. return $this;
  46. }
  47. public function disabledViewTopBody()
  48. {
  49. $this->isViewTopBody = false;
  50. return $this;
  51. }
  52. public function isViewTopBody()
  53. {
  54. return $this->isViewTopBody;
  55. }
  56. }