本文整理汇总了PHP中Magento\Framework\Model\Resource\Db\AbstractDb::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractDb::__construct方法的具体用法?PHP AbstractDb::__construct怎么用?PHP AbstractDb::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\Model\Resource\Db\AbstractDb
的用法示例。
在下文中一共展示了AbstractDb::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param \Magento\Framework\App\Resource $resource
* @param \Magento\Framework\Locale\ResolverInterface $localeResolver
* @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver
* @param string|null $scope
*/
public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Framework\App\ScopeResolverInterface $scopeResolver, $scope = null)
{
$this->_localeResolver = $localeResolver;
$this->scopeResolver = $scopeResolver;
$this->scope = $scope;
parent::__construct($resource);
}
示例2: __construct
/**
* @param \Magento\Framework\App\Resource $resource
* @param \Magento\Framework\Stdlib\DateTime\DateTime $date
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Framework\Stdlib\DateTime $dateTime
*/
public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\Stdlib\DateTime $dateTime)
{
$this->_date = $date;
$this->_eventManager = $eventManager;
$this->dateTime = $dateTime;
parent::__construct($resource);
}
示例3: __construct
/**
* @param \Magento\Framework\App\Resource $resource
* @param \Magento\Framework\Stdlib\DateTime\DateTime $date
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\Stdlib\String $string
*/
public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Stdlib\String $string)
{
$this->_date = $date;
$this->_storeManager = $storeManager;
$this->string = $string;
parent::__construct($resource);
}
示例4: __construct
/**
* @param \Magento\Framework\Model\Resource\Db\Context $context
* @param \Magento\Customer\Model\Session $customerSession
* @param \Magento\Review\Model\Rating\Option\VoteFactory $ratingOptionVoteF
* @param \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress
* @param string|null $resourcePrefix
*/
public function __construct(\Magento\Framework\Model\Resource\Db\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Review\Model\Rating\Option\VoteFactory $ratingOptionVoteF, \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress, $resourcePrefix = null)
{
$this->_customerSession = $customerSession;
$this->_ratingOptionVoteF = $ratingOptionVoteF;
$this->_remoteAddress = $remoteAddress;
parent::__construct($context, $resourcePrefix);
}
示例5: __construct
/**
* Class constructor
*
* @param \Magento\Framework\App\Resource $resource
* @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
*/
public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\Config\ScopeConfigInterface $config)
{
$this->_currencyFactory = $currencyFactory;
$this->_storeManager = $storeManager;
$this->_config = $config;
parent::__construct($resource);
}
示例6: __construct
/**
* Construct
*
* @param \Magento\Framework\Model\Resource\Db\Context $context
* @param \Magento\Framework\Stdlib\DateTime\DateTime $date
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\Stdlib\DateTime $dateTime
* @param string|null $resourcePrefix
*/
public function __construct(\Magento\Framework\Model\Resource\Db\Context $context, \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Stdlib\DateTime $dateTime, $resourcePrefix = null)
{
parent::__construct($context, $resourcePrefix);
$this->_date = $date;
$this->_storeManager = $storeManager;
$this->dateTime = $dateTime;
}
示例7: __construct
/**
* @param \Magento\Framework\App\Resource $resource
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Store\Model\WebsiteFactory $websiteFactory
* @param \Magento\Eav\Model\Config $eavConfig
*/
public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Store\Model\WebsiteFactory $websiteFactory, \Magento\Eav\Model\Config $eavConfig)
{
parent::__construct($resource);
$this->_storeManager = $storeManager;
$this->_websiteFactory = $websiteFactory;
$this->eavConfig = $eavConfig;
}
示例8: __construct
/**
* @param \Magento\Framework\Model\Resource\Db\Context $context
* @param \Magento\Framework\Locale\ResolverInterface $localeResolver
* @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver
* @param string|null $resourcePrefix
* @param string|null $scope
*/
public function __construct(\Magento\Framework\Model\Resource\Db\Context $context, \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Framework\App\ScopeResolverInterface $scopeResolver, $resourcePrefix = null, $scope = null)
{
$this->_localeResolver = $localeResolver;
$this->scopeResolver = $scopeResolver;
$this->scope = $scope;
parent::__construct($context, $resourcePrefix);
}
示例9: __construct
/**
* @param \Magento\Framework\Model\Resource\Db\Context $context
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Framework\Filter\FilterManager $filter
* @param Helper $resourceHelper
* @param string|null $resourcePrefix
*/
public function __construct(\Magento\Framework\Model\Resource\Db\Context $context, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\Filter\FilterManager $filter, \Magento\Search\Model\Resource\Helper $resourceHelper, $resourcePrefix = null)
{
$this->_eventManager = $eventManager;
$this->filter = $filter;
$this->_resourceHelper = $resourceHelper;
parent::__construct($context, $resourcePrefix);
}
示例10: __construct
/**
* @param \Magento\Framework\Model\Resource\Db\Context $context
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Store\Model\WebsiteFactory $websiteFactory
* @param \Magento\Eav\Model\Config $eavConfig
* @param string|null $resourcePrefix
*/
public function __construct(\Magento\Framework\Model\Resource\Db\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Store\Model\WebsiteFactory $websiteFactory, \Magento\Eav\Model\Config $eavConfig, $resourcePrefix = null)
{
parent::__construct($context, $resourcePrefix);
$this->_storeManager = $storeManager;
$this->_websiteFactory = $websiteFactory;
$this->eavConfig = $eavConfig;
}
示例11: __construct
/**
* @param \Magento\Framework\App\Resource $resource
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Framework\Filter\FilterManager $filter
* @param Helper $resourceHelper
*/
public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\Filter\FilterManager $filter, \Magento\CatalogSearch\Model\Resource\Helper $resourceHelper)
{
$this->_eventManager = $eventManager;
$this->filter = $filter;
$this->_resourceHelper = $resourceHelper;
parent::__construct($resource);
}
示例12: __construct
/**
* Construct
*
* @param \Magento\Framework\Model\Resource\Db\Context $context
* @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
* @param Advanced $searchResource
* @param \Magento\CatalogSearch\Helper\Data $catalogSearchData
* @param string|null $resourcePrefix
*/
public function __construct(\Magento\Framework\Model\Resource\Db\Context $context, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\CatalogSearch\Model\Resource\Advanced $searchResource, \Magento\CatalogSearch\Helper\Data $catalogSearchData, $resourcePrefix = null)
{
$this->_catalogProductVisibility = $catalogProductVisibility;
$this->_searchResource = $searchResource;
$this->_catalogSearchData = $catalogSearchData;
parent::__construct($context, $resourcePrefix);
}
示例13: __construct
/**
* Construct
*
* @param \Magento\Framework\App\Resource $resource
* @param \Magento\Framework\Acl\CacheInterface $aclCache
* @param \Magento\User\Model\RoleFactory $roleFactory
* @param \Magento\Framework\Stdlib\DateTime $dateTime
*/
public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\Acl\CacheInterface $aclCache, \Magento\User\Model\RoleFactory $roleFactory, \Magento\Framework\Stdlib\DateTime $dateTime)
{
parent::__construct($resource);
$this->_aclCache = $aclCache;
$this->_roleFactory = $roleFactory;
$this->dateTime = $dateTime;
}
示例14: __construct
/**
* @param \Magento\Framework\App\Resource $resource
* @param \Magento\Framework\App\State $appState
* @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver
* @param null|string $scope
*/
public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\App\State $appState, \Magento\Framework\App\ScopeResolverInterface $scopeResolver, $scope = null)
{
$this->_appState = $appState;
$this->scopeResolver = $scopeResolver;
$this->scope = $scope;
parent::__construct($resource);
}
示例15: __construct
/**
* @param \Magento\Framework\Model\Resource\Db\Context $context
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Catalog\Model\Layer\Resolver $layerResolver
* @param \Magento\Customer\Model\Session $session
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param string|null $resourcePrefix
*/
public function __construct(\Magento\Framework\Model\Resource\Db\Context $context, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Catalog\Model\Layer\Resolver $layerResolver, \Magento\Customer\Model\Session $session, \Magento\Store\Model\StoreManagerInterface $storeManager, $resourcePrefix = null)
{
$this->layer = $layerResolver->get();
$this->session = $session;
$this->storeManager = $storeManager;
$this->_eventManager = $eventManager;
parent::__construct($context, $resourcePrefix);
}