Tab.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\Component\Layout\Tabs;
  7. use Magento\Ui\Component\AbstractComponent;
  8. /**
  9. * Class Tab
  10. */
  11. class Tab extends AbstractComponent implements TabInterface
  12. {
  13. const NAME = 'tab';
  14. /**
  15. * Get component name
  16. *
  17. * @return string
  18. */
  19. public function getComponentName()
  20. {
  21. return static::NAME;
  22. }
  23. /**
  24. * Return Tab label
  25. *
  26. * @return string
  27. */
  28. public function getTabLabel()
  29. {
  30. return $this->getData('tab_label');
  31. }
  32. /**
  33. * Return Tab title
  34. *
  35. * @return string
  36. */
  37. public function getTabTitle()
  38. {
  39. return $this->getData('tab_title');
  40. }
  41. /**
  42. * Tab class getter
  43. *
  44. * @return string
  45. */
  46. public function getTabClass()
  47. {
  48. return $this->getData('tab_class');
  49. }
  50. /**
  51. * Return URL link to Tab content
  52. *
  53. * @return string
  54. */
  55. public function getTabUrl()
  56. {
  57. return $this->getData('tab_url');
  58. }
  59. /**
  60. * Tab should be loaded trough Ajax call
  61. *
  62. * @return bool
  63. */
  64. public function isAjaxLoaded()
  65. {
  66. return $this->getData('is_ajax_loaded');
  67. }
  68. /**
  69. * Can show tab in tabs
  70. *
  71. * @return boolean
  72. */
  73. public function canShowTab()
  74. {
  75. return $this->getData('can_show_tab');
  76. }
  77. /**
  78. * Tab is hidden
  79. *
  80. * @return boolean
  81. */
  82. public function isHidden()
  83. {
  84. return $this->getData('is_hidden');
  85. }
  86. }