Пример #1
0
 /**
  * @param \Magento\Framework\Module\Setup\Context $context
  * @param string $resourceName
  * @param string $moduleName
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Module\Setup\Context $context, $resourceName, $moduleName, $connectionName = \Magento\Framework\Module\Updater\SetupInterface::DEFAULT_SETUP_CONNECTION)
 {
     parent::__construct($context->getResourceModel(), $connectionName);
     $this->_eventManager = $context->getEventManager();
     $this->_logger = $context->getLogger();
     $this->_modulesReader = $context->getModulesReader();
     $this->_resourceName = $resourceName;
     $this->_resource = $context->getResource();
     $this->_migrationFactory = $context->getMigrationFactory();
     $this->_moduleConfig = $context->getModuleList()->getOne($moduleName);
     $this->filesystem = $context->getFilesystem();
     $this->modulesDir = $this->filesystem->getDirectoryRead(DirectoryList::MODULES);
 }
Пример #2
0
 /**
  * Init
  *
  * @param \Magento\Framework\Module\Setup\Context $context
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Module\Setup\Context $context, $connectionName = ModuleDataSetupInterface::DEFAULT_SETUP_CONNECTION)
 {
     parent::__construct($context->getResourceModel(), $connectionName);
     $this->_eventManager = $context->getEventManager();
     $this->_logger = $context->getLogger();
     $this->_modulesReader = $context->getModulesReader();
     $this->_migrationFactory = $context->getMigrationFactory();
     $this->filesystem = $context->getFilesystem();
     $this->modulesDir = $this->filesystem->getDirectoryRead(DirectoryList::MODULES);
     $this->setupCache = new SetupCache();
 }
Пример #3
0
 /**
  * @param \Magento\Framework\Module\Setup\Context $context
  * @param \Magento\Framework\Module\Setup\MigrationData $migrationData
  * @param string $confPathToMapFile
  * @param string $resourceName
  * @param string $moduleName
  * @param string $connectionName
  * @param array $compositeModules
  */
 public function __construct(\Magento\Framework\Module\Setup\Context $context, $resourceName, $moduleName, \Magento\Framework\Module\Setup\MigrationData $migrationData, $confPathToMapFile, $connectionName = \Magento\Framework\Module\Updater\SetupInterface::DEFAULT_SETUP_CONNECTION, $compositeModules = array())
 {
     $this->_directory = $context->getFilesystem()->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
     $this->_pathToMapFile = $confPathToMapFile;
     $this->_migrationData = $migrationData;
     $this->_replacePatterns = array(self::FIELD_CONTENT_TYPE_WIKI => $this->_migrationData->getWikiFindPattern(), self::FIELD_CONTENT_TYPE_XML => $this->_migrationData->getXmlFindPattern());
     $this->_compositeModules = $compositeModules;
     parent::__construct($context, $resourceName, $moduleName, $connectionName);
 }
Пример #4
0
 /**
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Framework\App\Resource $resource
  * @param \Magento\Framework\Module\Dir\Reader $modulesReader
  * @param \Magento\Framework\Module\ModuleListInterface $moduleList
  * @param \Magento\Framework\Module\ResourceInterface $resourceResource
  * @param \Magento\Framework\Module\Setup\MigrationFactory $migrationFactory
  * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
  * @param \Magento\Framework\App\Filesystem $filesystem
  * @param PropertyMapperInterface $attributeMapper
  */
 public function __construct(\Magento\Framework\Logger $logger, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\App\Resource $resource, \Magento\Framework\Module\Dir\Reader $modulesReader, \Magento\Framework\Module\ModuleListInterface $moduleList, \Magento\Framework\Module\ResourceInterface $resourceResource, \Magento\Framework\Module\Setup\MigrationFactory $migrationFactory, \Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Framework\App\Filesystem $filesystem, PropertyMapperInterface $attributeMapper)
 {
     $this->attributeMapper = $attributeMapper;
     parent::__construct($logger, $eventManager, $resource, $modulesReader, $moduleList, $resourceResource, $migrationFactory, $encryptor, $filesystem);
 }