SidebarItem.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /* * ********************************************************************
  3. * KerioEmail product developed. (Nov 19, 2018)
  4. * *
  5. *
  6. * CREATED BY THURDATA -> http://thurdata.com
  7. * CONTACT -> contact@thurdata.com
  8. *
  9. *
  10. * This software is furnished under a license and may be used and copied
  11. * only in accordance with the terms of such license and with the
  12. * inclusion of the above copyright notice. This software or any other
  13. * copies thereof may not be provided or otherwise made available to any
  14. * other person. No title to and ownership of the software is hereby
  15. * transferred.
  16. *
  17. *
  18. * ******************************************************************** */
  19. namespace ThurData\Servers\KerioEmail\Core\UI\Widget\Sidebar;
  20. use \ThurData\Servers\KerioEmail\Core\UI\Builder\BaseContainer;
  21. /**
  22. * Description of Sidebar
  23. *
  24. * @autor ThurData <info@thurdata.ch>
  25. */
  26. class SidebarItem extends BaseContainer
  27. {
  28. use SidebarTrait;
  29. public function __construct($id, $href = null, $order = null, $targetBlankl = false)
  30. {
  31. if ($href)
  32. {
  33. $this->setHref($href);
  34. }
  35. $this->order = $order;
  36. $this->targetBlank = $targetBlankl;
  37. parent::__construct($id);
  38. }
  39. public function getId()
  40. {
  41. return $this->id;
  42. }
  43. public function setId($id)
  44. {
  45. $this->id = $id;
  46. return $this;
  47. }
  48. public function getHref()
  49. {
  50. return $this->htmlAttributes['href'];
  51. }
  52. public function setHref($href)
  53. {
  54. $this->htmlAttributes['href']= $href;
  55. return $this;
  56. }
  57. public function setTarget($target)
  58. {
  59. $this->htmlAttributes['target'] = $target;
  60. return $this;
  61. }
  62. public function setHtml($html)
  63. {
  64. $this->html = $html;
  65. return $this;
  66. }
  67. }