/** * @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\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Index\Model\IndexerFactory $indexerFactory * @param Eav\AttributeFactory $eavAttributeResourceFactory * @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\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Index\Model\IndexerFactory $indexerFactory, \Magento\Catalog\Model\Resource\Eav\AttributeFactory $eavAttributeResourceFactory, $moduleName = 'Magento_Catalog', $connectionName = \Magento\Framework\Module\Updater\SetupInterface::DEFAULT_SETUP_CONNECTION) { $this->_categoryFactory = $categoryFactory; $this->_indexerFactory = $indexerFactory; $this->_eavAttributeResourceFactory = $eavAttributeResourceFactory; parent::__construct($context, $resourceName, $cache, $attrGroupCollectionFactory, $moduleName, $connectionName); }
/** * Add entity attribute. Overwritten for flat entities support * * @param int|string $entityTypeId * @param string $code * @param array $attr * @return $this */ public function addAttribute($entityTypeId, $code, array $attr) { if (isset($this->_flatEntityTables[$entityTypeId]) && $this->_flatTableExist($this->_flatEntityTables[$entityTypeId])) { $this->_addFlatAttribute($this->_flatEntityTables[$entityTypeId], $code, $attr); } else { parent::addAttribute($entityTypeId, $code, $attr); } return $this; }
/** * @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\Customer\Helper\Address $customerAddress * @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\Customer\Helper\Address $customerAddress, $moduleName = 'Magento_Checkout', $connectionName = \Magento\Framework\Module\Updater\SetupInterface::DEFAULT_SETUP_CONNECTION) { $this->_customerAddress = $customerAddress; parent::__construct($context, $resourceName, $cache, $attrGroupCollectionFactory, $moduleName, $connectionName); }