/** * @param \Magento\Customer\Model\Address\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Helper\Address $addressHelper * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param string $cacheId */ public function __construct(\Magento\Customer\Model\Address\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Customer\Helper\Address $addressHelper, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, $cacheId = 'address_format') { parent::__construct($reader, $cache, $cacheId); $this->_storeManager = $storeManager; $this->_addressHelper = $addressHelper; $this->_scopeConfig = $scopeConfig; }
/** * @param \Magento\Framework\Mview\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param \Magento\Framework\Mview\View\State\CollectionInterface $stateCollection * @param string $cacheId */ public function __construct(\Magento\Framework\Mview\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, \Magento\Framework\Mview\View\State\CollectionInterface $stateCollection, $cacheId = 'mview_config') { $this->stateCollection = $stateCollection; $isCacheExists = $cache->test($cacheId); parent::__construct($reader, $cache, $cacheId); if (!$isCacheExists) { $this->deleteNonexistentStates(); } }
/** * @param \Magento\Indexer\Model\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param \Magento\Indexer\Model\Resource\Indexer\State\Collection $stateCollection * @param string $cacheId */ public function __construct(\Magento\Indexer\Model\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, \Magento\Indexer\Model\Resource\Indexer\State\Collection $stateCollection, $cacheId = 'indexer_config') { $this->stateCollection = $stateCollection; $isCacheExists = $cache->test($cacheId); parent::__construct($reader, $cache, $cacheId); if (!$isCacheExists) { $this->deleteNonexistentStates(); } }
/** * Return analysis config by language. * * @param string $language A language code (eg: en, fr, ...). * @param mixed $default Default value if no config is found. * * @return mixed */ public function get($language = null, $default = null) { if ($language === null) { $language = 'default'; } $data = parent::get($language, null); if ($data === null) { $data = $this->get('default', $default); } return $data; }
/** * @param \Magento\Catalog\Model\ProductOptions\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId */ public function __construct(\Magento\Catalog\Model\ProductOptions\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = 'product_options_config') { parent::__construct($reader, $cache, $cacheId); }
/** * Constructor. * * @param Reader $reader Config file reader. * @param CacheInterface $cache Cache interface. * @param IndexSettingsInterface $indexSettings Index settings. * @param string $cacheId Config cache id. */ public function __construct(Reader $reader, CacheInterface $cache, IndexSettingsInterface $indexSettings, $cacheId = self::CACHE_ID) { parent::__construct($reader, $cache, $cacheId); $this->indexSettings = $indexSettings; $this->addMappings(); }
public function testGetTotals() { $configuration = ['total1' => ['title' => 'Title1'], 'total2' => ['title' => 'Title2']]; $this->_dataStorage->expects($this->once())->method('get')->with('totals', [])->will($this->returnValue($configuration)); $this->assertSame($configuration, $this->_model->getTotals()); }
/** * @param \Magento\Framework\Search\Request\Config\FilesystemReader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId */ public function __construct(\Magento\Framework\Search\Request\Config\FilesystemReader $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = self::CACHE_ID) { parent::__construct($reader, $cache, $cacheId); }
/** * Initialize dependencies. * * @param \Magento\Framework\Communication\Config\Reader\XmlReader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param \Magento\Framework\Communication\Config\Reader\EnvReader $envReader * @param string $cacheId */ public function __construct(\Magento\Framework\Communication\Config\Reader\XmlReader $reader, \Magento\Framework\Config\CacheInterface $cache, \Magento\Framework\Communication\Config\Reader\EnvReader $envReader, $cacheId = 'communication_config_cache') { parent::__construct($reader, $cache, $cacheId); $this->merge($envReader->read()); }
/** * @param \Magento\Directory\Model\Country\Postcode\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache */ public function __construct(\Magento\Directory\Model\Country\Postcode\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache) { parent::__construct($reader, $cache, 'country_postcodes'); }
/** * Initialize parameters * * @param \Magento\Cron\Model\Config\Reader\Xml $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param \Magento\Cron\Model\Config\Reader\Db $dbReader * @param string $cacheId */ public function __construct(\Magento\Cron\Model\Config\Reader\Xml $reader, \Magento\Framework\Config\CacheInterface $cache, \Magento\Cron\Model\Config\Reader\Db $dbReader, $cacheId = 'crontab_config_cache') { parent::__construct($reader, $cache, $cacheId); $this->merge($dbReader->get()); }
/** * @param \Magento\Cron\Model\Groups\Config\Reader\Xml $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId */ public function __construct(\Magento\Cron\Model\Groups\Config\Reader\Xml $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = 'cron_groups_config_cache') { parent::__construct($reader, $cache, $cacheId); }
/** * @param \Magento\Framework\Config\ReaderInterface $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId */ public function __construct(\Magento\Framework\Config\ReaderInterface $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = 'request_declaration') { parent::__construct($reader, $cache, $cacheId); }
/** * @param \Magento\Email\Model\Template\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache */ public function __construct(\Magento\Email\Model\Template\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache) { parent::__construct($reader, $cache, 'email_templates'); }
public function __construct(\Ktpl\Test\Model\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = 'ktpl_test_config') { parent::__construct($reader, $cache, $cacheId); }
/** * Initialize reader and cache. * * @param Reader $reader * @param CacheInterface $cache */ public function __construct(Reader $reader, CacheInterface $cache) { parent::__construct($reader, $cache, self::CACHE_ID); }
/** * @param \Magento\Sales\Model\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId */ public function __construct(\Magento\Sales\Model\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = 'sales_totals_config_cache') { parent::__construct($reader, $cache, $cacheId); }
/** * @param \Magento\ImportExport\Model\Export\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId */ public function __construct(\Magento\ImportExport\Model\Export\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = 'export_config_cache') { parent::__construct($reader, $cache, $cacheId); }
/** * @param Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache */ public function __construct(Reader $reader, \Magento\Framework\Config\CacheInterface $cache) { $this->cacheTags = [\Magento\Eav\Model\Entity\Attribute::CACHE_TAG]; parent::__construct($reader, $cache, 'data_source'); }
/** * Get config value by key * * @param string $path * @param mixed $default * @return array|mixed|null */ public function get($path = null, $default = null) { $this->_loadScopedData(); return parent::get($path, $default); }
/** * @param \Magento\Catalog\Model\Attribute\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache */ public function __construct(\Magento\Catalog\Model\Attribute\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache) { parent::__construct($reader, $cache, 'catalog_attributes'); }
/** * Initialize dependencies. * * @param \Magento\Framework\Communication\Config\CompositeReader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId */ public function __construct(\Magento\Framework\Communication\Config\CompositeReader $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = 'communication_config_cache') { parent::__construct($reader, $cache, $cacheId); }
public function __construct(\Firebear\ImportExport\Model\Source\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = 'firebear_importexport_config') { parent::__construct($reader, $cache, $cacheId); }
/** * Init data for configuration. * * @return void */ protected function initData() { parent::initData(); $this->_data = array_map([$this, 'initIndexConfig'], $this->_data); }
/** * @param \Magento\Eav\Model\Entity\Attribute\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId * @codeCoverageIgnore */ public function __construct(\Magento\Eav\Model\Entity\Attribute\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = "eav_attributes") { parent::__construct($reader, $cache, $cacheId); }
/** * Constructor * * @param \Magento\Framework\Search\SearchEngine\Config\Reader $reader * @param \Magento\Framework\Config\CacheInterface $cache * @param string $cacheId */ public function __construct(\Magento\Framework\Search\SearchEngine\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, $cacheId = 'search_engine_config_cache') { parent::__construct($reader, $cache, $cacheId); }