123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Config\Model\Config\Structure\Element\Group;
- /**
- * @api
- * @since 100.0.2
- */
- class Proxy extends \Magento\Config\Model\Config\Structure\Element\Group implements
- \Magento\Framework\ObjectManager\NoninterceptableInterface
- {
- /**
- * Object manager
- * @var \Magento\Framework\ObjectManagerInterface
- */
- protected $_objectManager;
- /**
- * @var \Magento\Config\Model\Config\Structure\Element\Group
- */
- protected $_subject;
- /**
- * @param \Magento\Framework\ObjectManagerInterface $objectManger
- */
- public function __construct(\Magento\Framework\ObjectManagerInterface $objectManger)
- {
- $this->_objectManager = $objectManger;
- }
- /**
- * Retrieve subject
- *
- * @return \Magento\Config\Model\Config\Structure\Element\Group
- */
- protected function _getSubject()
- {
- if (!$this->_subject) {
- $this->_subject = $this->_objectManager->create(
- \Magento\Config\Model\Config\Structure\Element\Group::class
- );
- }
- return $this->_subject;
- }
- /**
- * Set element data
- *
- * @param array $data
- * @param string $scope
- * @return void
- */
- public function setData(array $data, $scope)
- {
- $this->_getSubject()->setData($data, $scope);
- }
- /**
- * Retrieve element id
- *
- * @return string
- */
- public function getId()
- {
- return $this->_getSubject()->getId();
- }
- /**
- * Retrieve element label
- *
- * @return string
- */
- public function getLabel()
- {
- return $this->_getSubject()->getLabel();
- }
- /**
- * Retrieve element label
- *
- * @return string
- */
- public function getComment()
- {
- return $this->_getSubject()->getComment();
- }
- /**
- * Retrieve frontend model class name
- *
- * @return string
- */
- public function getFrontendModel()
- {
- return $this->_getSubject()->getFrontendModel();
- }
- /**
- * Retrieve arbitrary element attribute
- *
- * @param string $key
- * @return mixed
- */
- public function getAttribute($key)
- {
- return $this->_getSubject()->getAttribute($key);
- }
- /**
- * Check whether section is allowed for current user
- *
- * @return bool
- */
- public function isAllowed()
- {
- return $this->_getSubject()->isAllowed();
- }
- /**
- * Check whether element should be displayed
- *
- * @param string $websiteCode
- * @param string $storeCode
- * @return bool
- */
- public function isVisible($websiteCode = '', $storeCode = '')
- {
- return $this->_getSubject()->isVisible($websiteCode, $storeCode);
- }
- /**
- * Retrieve css class of a tab
- *
- * @return string
- */
- public function getClass()
- {
- return $this->_getSubject()->getClass();
- }
- /**
- * Check whether element has visible child elements
- *
- * @return bool
- */
- public function hasChildren()
- {
- return $this->_getSubject()->hasChildren();
- }
- /**
- * Retrieve children iterator
- *
- * @return \Magento\Config\Model\Config\Structure\Element\Iterator
- */
- public function getChildren()
- {
- return $this->_getSubject()->getChildren();
- }
- /**
- * Should group fields be cloned
- *
- * @return bool
- */
- public function shouldCloneFields()
- {
- return $this->_getSubject()->shouldCloneFields();
- }
- /**
- * Retrieve clone model
- *
- * @return \Magento\Framework\Model\AbstractModel
- */
- public function getCloneModel()
- {
- return $this->_getSubject()->getCloneModel();
- }
- /**
- * Populate form fieldset with group data
- *
- * @param \Magento\Framework\Data\Form\Element\Fieldset $fieldset
- * @return void
- */
- public function populateFieldset(\Magento\Framework\Data\Form\Element\Fieldset $fieldset)
- {
- $this->_getSubject()->populateFieldset($fieldset);
- }
- /**
- * Retrieve element data
- *
- * @return array
- */
- public function getData()
- {
- return $this->_getSubject()->getData();
- }
- /**
- * Retrieve element path
- *
- * @param string $fieldPrefix
- * @return string
- */
- public function getPath($fieldPrefix = '')
- {
- return $this->_getSubject()->getPath($fieldPrefix);
- }
- /**
- * Check whether element should be expanded
- *
- * @return bool
- */
- public function isExpanded()
- {
- return $this->_getSubject()->isExpanded();
- }
- /**
- * Retrieve fieldset css
- *
- * @return string
- */
- public function getFieldsetCss()
- {
- return $this->_getSubject()->getFieldsetCss();
- }
- /**
- * Retrieve element dependencies
- *
- * @param string $storeCode
- * @return array
- */
- public function getDependencies($storeCode)
- {
- return $this->_getSubject()->getDependencies($storeCode);
- }
- }
|