예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function getTabs()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTabs');
     if (!$pluginInfo) {
         return parent::getTabs();
     } else {
         return $this->___callPlugins('getTabs', func_get_args(), $pluginInfo);
     }
 }
예제 #2
0
파일: Tabs.php 프로젝트: tingyeeh/magento2
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Config\Model\Config\Structure $configStructure
  * @param \Magento\Backend\Helper\Data $backendHelper
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Config\Model\Config\Structure $configStructure, \Magento\Backend\Helper\Data $backendHelper, array $data = [])
 {
     $this->_backendHelper = $backendHelper;
     parent::__construct($context, $data);
     $this->_tabs = $configStructure->getTabs();
     $this->setId('system_config_tabs');
     $this->setTitle(__('Configuration'));
     $this->_currentSectionId = $this->getRequest()->getParam('section');
     $this->_backendHelper->addPageHelpUrl($this->getRequest()->getParam('section') . '/');
 }
예제 #3
0
파일: Data.php 프로젝트: swnsma/magento2
 /**
  * Iterate over all config tabs, extract sections and its subsections
  * @param string $itemsSeparator
  * @param string $itemPrefix
  * @return array
  */
 public function getConfigSectionsArray($itemsSeparator = ' ', $itemPrefix = '')
 {
     $sections = array();
     foreach ($this->_configStructure->getTabs() as $tab) {
         /** @var $tab \Magento\Config\Model\Config\Structure\Element\Tab */
         foreach ($tab->getChildren() as $section) {
             /** @var $section \Magento\Config\Model\Config\Structure\Element\Section */
             // We need the label & url again for the sub sections
             $sectionLabel = $itemPrefix . $tab->getLabel() . $itemsSeparator . $section->getLabel();
             $sectionUrl = $this->_url->getUrl('adminhtml/system_config/edit', array('section' => $section->getId()));
             // First add global section to the launcher items...
             $sections[] = ['label' => $sectionLabel, 'value' => $sectionUrl];
             foreach ($section->getChildren() as $subSection) {
                 /** @var $subSection \Magento\Config\Model\Config\Structure\Element\Section */
                 // ...then add all sub sections
                 $sections[] = ['label' => $sectionLabel . $itemsSeparator . $subSection->getLabel(), 'value' => $sectionUrl . '#' . $section->getId() . '_' . $subSection->getId() . '-link'];
             }
         }
     }
     return $sections;
 }
 /**
  *
  * @param \Magento\Framework\App\Action\Context $context
  * @param \ADM\QuickDevBar\Helper\Data $qdbHelper
  * @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory
  * @param \Magento\Framework\View\LayoutFactory $layoutFactory
  * @param \Magento\Config\Model\Config\Structure $structure
  */
 public function __construct(\Magento\Framework\App\Action\Context $context, \ADM\QuickDevBar\Helper\Data $qdbHelper, \Magento\Framework\Controller\Result\RawFactory $resultRawFactory, \Magento\Framework\View\LayoutFactory $layoutFactory, \Magento\Config\Model\Config\Structure $configStructure)
 {
     parent::__construct($context, $qdbHelper, $resultRawFactory, $layoutFactory);
     //$this->_configStructure = $configStructure;
     $this->_tabs = $configStructure->getTabs();
 }