SidebarItem.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /* * ********************************************************************
  3. * ProxmoxCloudVps product developed. (Nov 19, 2018)
  4. * *
  5. *
  6. * CREATED BY MODULESGARDEN -> http://modulesgarden.com
  7. * CONTACT -> contact@modulesgarden.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 ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Sidebar;
  20. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Builder\BaseContainer;
  21. /**
  22. * Description of Sidebar
  23. *
  24. * @author Pawel Kopec <pawelk@modulesgardne.com>
  25. */
  26. class SidebarItem extends BaseContainer
  27. {
  28. use SidebarTrait;
  29. public function __construct($id, $href = null, $order = null)
  30. {
  31. if ($href)
  32. {
  33. $this->setHref($href);
  34. }
  35. $this->order = $order;
  36. parent::__construct($id);
  37. }
  38. public function getId()
  39. {
  40. return $this->id;
  41. }
  42. public function setId($id = null)
  43. {
  44. $this->id = $id;
  45. return $this;
  46. }
  47. public function getHref()
  48. {
  49. return $this->htmlAttributes['href'];
  50. }
  51. public function setHref($href)
  52. {
  53. $this->htmlAttributes['href']= $href;
  54. return $this;
  55. }
  56. public function setTarget($target)
  57. {
  58. $this->htmlAttributes['target'] = $target;
  59. return $this;
  60. }
  61. public function setHtml($html)
  62. {
  63. $this->html = $html;
  64. return $this;
  65. }
  66. }