本文整理汇总了PHP中Magento\Framework\App\Config\Value::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Value::__construct方法的具体用法?PHP Value::__construct怎么用?PHP Value::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\App\Config\Value
的用法示例。
在下文中一共展示了Value::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param \Magento\Paypal\Model\CertFactory $certFactory
* @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\Paypal\Model\CertFactory $certFactory, \Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->_certFactory = $certFactory;
$this->_encryptor = $encryptor;
$this->_tmpDirectory = $filesystem->getDirectoryRead(DirectoryList::SYS_TMP);
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
}
示例2: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, \Smart2Pay\GlobalPay\Model\MethodFactory $methodFactory, \Smart2Pay\GlobalPay\Model\ConfiguredMethodsFactory $configuredMethodsFactory, \Smart2Pay\GlobalPay\Helper\Smart2Pay $helperSmart2Pay, array $data = [])
{
$this->_methodFactory = $methodFactory;
$this->_configuredMethodsFactory = $configuredMethodsFactory;
$this->_helper = $helperSmart2Pay;
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
}
示例3: __construct
/**
* SeoObserver constructor.
*
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource
* @param \Magento\Framework\Data\Collection\AbstractDb|null $resourceCollection
* @param \Mageplaza\Seo\Helper\Data $helper
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, SeoHelper $helper, array $data = [])
{
$this->_directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
$this->_fileRobot = 'robots.txt';
$this->_fileHtaccess = '.htaccess';
$this->_helper = $helper;
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
}
示例4: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory
* @param \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData
* @param \Magento\Framework\App\Filesystem $filesystem
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Core\Model\File\UploaderFactory $uploaderFactory, \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData, \Magento\Framework\App\Filesystem $filesystem, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array())
{
$this->_uploaderFactory = $uploaderFactory;
$this->_requestData = $requestData;
$this->_filesystem = $filesystem;
$this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
}
示例5: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param \Magento\Config\Model\ResourceModel\Config\Data\CollectionFactory $configsFactory
* @param \Magento\Store\Model\WebsiteFactory $websiteFactory
* @param \Magento\Store\Model\StoreFactory $storeFactory
* @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\Config\Model\ResourceModel\Config\Data\CollectionFactory $configsFactory, \Magento\Store\Model\WebsiteFactory $websiteFactory, \Magento\Store\Model\StoreFactory $storeFactory, \Magento\Framework\Locale\CurrencyInterface $localeCurrency, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->_configsFactory = $configsFactory;
$this->_websiteFactory = $websiteFactory;
$this->_storeFactory = $storeFactory;
$this->_localeCurrency = $localeCurrency;
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
}
示例6: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param \Magento\MediaStorage\Model\File\UploaderFactory $uploaderFactory
* @param \Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData
* @param Filesystem $filesystem
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\MediaStorage\Model\File\UploaderFactory $uploaderFactory, \Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData, Filesystem $filesystem, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->_uploaderFactory = $uploaderFactory;
$this->_requestData = $requestData;
$this->_filesystem = $filesystem;
$this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
}
示例7: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param \Magento\UrlRewrite\Helper\UrlRewrite $urlRewriteHelper
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\App\Resource $appResource
* @param \Magento\UrlRewrite\Model\UrlFinderInterface $urlFinder
* @param array $data
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\UrlRewrite\Helper\UrlRewrite $urlRewriteHelper, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\Resource $appResource, \Magento\UrlRewrite\Model\UrlFinderInterface $urlFinder, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
$this->urlRewriteHelper = $urlRewriteHelper;
$this->connection = $appResource->getConnection(Resource::DEFAULT_WRITE_RESOURCE);
$this->urlFinder = $urlFinder;
$this->storeManager = $storeManager;
}
示例8: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Config\Model\ResourceModel\Config $resourceConfig
* @param \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory
* @param \Magento\Framework\Model\ModelResource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Config\Model\ResourceModel\Config $resourceConfig, \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory, \Magento\Framework\Model\ModelResource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->resourceConfig = $resourceConfig;
$this->attributeFactory = $attributeFactory;
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
}
示例9: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\Validator\ObjectFactory $validatorCompositeFactory
* @param \Magento\GoogleAdwords\Model\Validator\Factory $validatorFactory
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\Validator\ObjectFactory $validatorCompositeFactory, \Magento\GoogleAdwords\Model\Validator\Factory $validatorFactory, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
$this->_validatorFactory = $validatorFactory;
$this->_validatorComposite = $validatorCompositeFactory->create();
}
示例10: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array())
{
$this->_tablerateFactory = $tablerateFactory;
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
}
示例11: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Indexer\Model\IndexerRegistry $indexerRegistry
* @param \Magento\Indexer\Model\Indexer\State $indexerState
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Indexer\Model\IndexerRegistry $indexerRegistry, \Magento\Indexer\Model\Indexer\State $indexerState, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
$this->indexerRegistry = $indexerRegistry;
$this->indexerState = $indexerState;
}
示例12: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\View\Asset\MergeService $mergeService
* @param \Magento\Framework\Model\ModelResource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\View\Asset\MergeService $mergeService, \Magento\Framework\Model\ModelResource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->_mergeService = $mergeService;
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
}
示例13: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Eav\Model\Config $eavConfig
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Eav\Model\Config $eavConfig, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array())
{
$this->_eavConfig = $eavConfig;
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
$this->storeManager = $storeManager;
}
示例14: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param \Magento\CatalogInventory\Helper\Minsaleqty $catalogInventoryMinsaleqty
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\CatalogInventory\Helper\Minsaleqty $catalogInventoryMinsaleqty, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->_catalogInventoryMinsaleqty = $catalogInventoryMinsaleqty;
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
}
示例15: __construct
/**
* Initialize dependencies
*
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->_design = $design;
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
}