RedirectButton.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /* * ********************************************************************
  3. * ProxmoxVPS Product developed. (27.03.19)
  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\ProxmoxVps\App\UI\Home\Buttons;
  20. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Interfaces\AdminArea;
  21. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Interfaces\ClientArea;
  22. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Buttons\ButtonRedirect;
  23. class RedirectButton extends ButtonRedirect implements ClientArea, AdminArea
  24. {
  25. protected $id = 'redirectButton';
  26. protected $class = ['lu-tile lu-tile--btn'];
  27. protected $icon = 'lu-zmdi lu-zmdi-plus';
  28. protected $title = 'redirectButton';
  29. protected $imageUrl = null;
  30. protected $htmlAttributes = [
  31. ];
  32. public function afterInitContent()
  33. {
  34. }
  35. public function initContent()
  36. {
  37. }
  38. /**
  39. * @return string
  40. */
  41. public function getHref()
  42. {
  43. return $this->getHtmlAttribute("href");
  44. }
  45. /**
  46. * @param string $href
  47. */
  48. public function setHref($href)
  49. {
  50. $this->addHtmlAttribute("href", $href);
  51. return $this;
  52. }
  53. /**
  54. * @return null
  55. */
  56. public function getImageUrl()
  57. {
  58. return $this->imageUrl;
  59. }
  60. /**
  61. * @param null $imageUrl
  62. */
  63. public function setImageUrl($imageUrl)
  64. {
  65. $this->imageUrl = $imageUrl;
  66. }
  67. }