public function execute()
 {
     //$tabs = $this->_configStructure->getTabs();
     var_dump(get_class($this->_tabs));
     $this->_tabs->rewind();
     foreach ($this->_tabs as $tab) {
         echo $tab->getLabel();
     }
 }
Exemple #2
0
 /**
  * Init current element
  *
  * @param array $element
  * @return void
  * @throws \LogicException
  */
 protected function _initFlyweight(array $element)
 {
     if (!isset($element[\Magento\Config\Model\Config\Structure::TYPE_KEY])) {
         throw new \LogicException('System config structure element must contain "type" attribute');
     }
     switch ($element[\Magento\Config\Model\Config\Structure::TYPE_KEY]) {
         case 'group':
             $this->_flyweight = $this->_groupFlyweight;
             break;
         case 'field':
         default:
             $this->_flyweight = $this->_fieldFlyweight;
     }
     parent::_initFlyweight($element);
 }
Exemple #3
0
 /**
  * @param \Magento\Config\Model\Config\Structure\Element\Tab $element
  */
 public function __construct(\Magento\Config\Model\Config\Structure\Element\Tab $element)
 {
     parent::__construct($element);
 }
 /**
  * @param string $elementId
  * @param bool $result
  * @dataProvider isLastDataProvider
  */
 public function testIsLast($elementId, $result)
 {
     $elementMock = $this->getMock('Magento\\Config\\Model\\Config\\Structure\\Element\\Field', [], [], '', false);
     $elementMock->expects($this->once())->method('getId')->will($this->returnValue($elementId));
     $this->assertEquals($result, $this->_model->isLast($elementMock));
 }