RedirectButton.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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\ProxmoxCloudVps\App\UI\Home\Buttons;
  20. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\AdminArea;
  21. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\ClientArea;
  22. class RedirectButton extends AbstractActionButton implements ClientArea, AdminArea
  23. {
  24. protected $id = 'redirectButton';
  25. protected $icon = 'lu-zmdi lu-zmdi-plus';
  26. protected $title = 'redirectButton';
  27. protected $imageUrl = null;
  28. protected $htmlAttributes = [
  29. 'data-toggle' => 'lu-tooltip',
  30. ];
  31. public function afterInitContent()
  32. {
  33. }
  34. public function initContent()
  35. {
  36. $this->addClass('lu-btn--primary');
  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. }