Diagrams.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Backend\Block\Dashboard;
  7. /**
  8. * Adminhtml dashboard diagram tabs
  9. *
  10. * @author Magento Core Team <core@magentocommerce.com>
  11. */
  12. class Diagrams extends \Magento\Backend\Block\Widget\Tabs
  13. {
  14. /**
  15. * @var string
  16. */
  17. protected $_template = 'Magento_Backend::widget/tabshoriz.phtml';
  18. /**
  19. * @return void
  20. */
  21. protected function _construct()
  22. {
  23. parent::_construct();
  24. $this->setId('diagram_tab');
  25. $this->setDestElementId('diagram_tab_content');
  26. }
  27. /**
  28. * @return $this
  29. */
  30. protected function _prepareLayout()
  31. {
  32. $this->addTab(
  33. 'orders',
  34. [
  35. 'label' => __('Orders'),
  36. 'content' => $this->getLayout()->createBlock(
  37. \Magento\Backend\Block\Dashboard\Tab\Orders::class
  38. )->toHtml(),
  39. 'active' => true
  40. ]
  41. );
  42. $this->addTab(
  43. 'amounts',
  44. [
  45. 'label' => __('Amounts'),
  46. 'content' => $this->getLayout()->createBlock(
  47. \Magento\Backend\Block\Dashboard\Tab\Amounts::class
  48. )->toHtml()
  49. ]
  50. );
  51. return parent::_prepareLayout();
  52. }
  53. }