示例#1
0
文件: Setup.php 项目: aiesh/magento2
 /**
  * @param Setup\Context $context
  * @param string $resourceName
  * @param \Magento\Framework\App\CacheInterface $cache
  * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory
  * @param string $moduleName
  * @param string $connectionName
  */
 public function __construct(\Magento\Eav\Model\Entity\Setup\Context $context, $resourceName, \Magento\Framework\App\CacheInterface $cache, \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory, $moduleName = 'Magento_Eav', $connectionName = \Magento\Framework\Module\Updater\SetupInterface::DEFAULT_SETUP_CONNECTION)
 {
     $this->_cache = $cache;
     $this->_attrGroupCollectionFactory = $attrGroupCollectionFactory;
     $this->attributeMapper = $context->getAttributeMapper();
     parent::__construct($context, $resourceName, $moduleName, $connectionName);
 }
示例#2
0
 /**
  * Init
  *
  * @param ModuleDataSetupInterface $setup
  * @param Context $context
  * @param CacheInterface $cache
  * @param CollectionFactory $attrGroupCollectionFactory
  */
 public function __construct(ModuleDataSetupInterface $setup, Context $context, CacheInterface $cache, CollectionFactory $attrGroupCollectionFactory)
 {
     $this->cache = $cache;
     $this->attrGroupCollectionFactory = $attrGroupCollectionFactory;
     $this->attributeMapper = $context->getAttributeMapper();
     $this->setup = $setup;
 }
 /**
  * @param ModuleDataSetupInterface $setup
  * @param Context $context
  * @param CacheInterface $cache
  * @param CollectionFactory $attrGroupCollectionFactory
  * @param ScopeConfigInterface $config
  */
 public function __construct(ModuleDataSetupInterface $setup, Context $context, CacheInterface $cache, CollectionFactory $attrGroupCollectionFactory, ScopeConfigInterface $config)
 {
     $this->config = $config;
     $this->encryptor = $context->getEncryptor();
     parent::__construct($setup, $context, $cache, $attrGroupCollectionFactory);
 }
示例#4
0
 /**
  * @param \Magento\Eav\Model\Entity\Setup\Context $context
  * @param string $resourceName
  * @param \Magento\Framework\App\CacheInterface $cache
  * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $config
  * @param string $moduleName
  * @param string $connectionName
  */
 public function __construct(\Magento\Eav\Model\Entity\Setup\Context $context, $resourceName, \Magento\Framework\App\CacheInterface $cache, \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory, \Magento\Framework\App\Config\ScopeConfigInterface $config, $moduleName = 'Magento_Sales', $connectionName = \Magento\Framework\Module\Updater\SetupInterface::DEFAULT_SETUP_CONNECTION)
 {
     $this->_config = $config;
     $this->_encryptor = $context->getEncryptor();
     parent::__construct($context, $resourceName, $cache, $attrGroupCollectionFactory, $moduleName, $connectionName);
 }