![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/extmag/shiplab/Block/Adminhtml/Configuration/ |
<?php /** * Copyright © Extmag. All rights reserved. */ namespace Extmag\Shiplab\Block\Adminhtml\Configuration; use Extmag\Shiplab\Helper\Config; use Extmag\Shiplab\Helper\Config\Structure\Element\Iterator\Tab; use Extmag\Shiplab\Model\Configuration\Structure\Element\Iterator; use Magento\Backend\Block\Template\Context; use Magento\Backend\Block\Widget; class Tabs extends Widget { /** * @var [] */ protected $_tabs; /** * @var string */ protected $_template = 'Extmag_Shiplab::configuration/tabs.phtml'; /** * @var string */ protected $_currentSectionId; /** * @param Context $context * @param Config $configStructure * @param array $data */ public function __construct( Context $context, Config $configStructure, array $data = [] ) { parent::__construct($context, $data); $configStructure->get(); $this->_tabs = $configStructure->getTabs(); $this->setId('system_config_tabs'); $this->setTitle(__('Configuration')); $this->_currentSectionId = $this->getRequest()->getParam('section'); } /** * @return Tab */ public function getTabs() { return $this->_tabs; } /** * Retrieve section url by section id * * @param string $section * @return string */ public function getSectionUrl($section) { return $this->getUrl('*/*/*', ['_current' => true, 'section' => $section->getId()]); } /** * Check whether section should be displayed as active * * @param string $section * @return bool */ public function isSectionActive($section) { return $section->getId() == $this->_currentSectionId; } }