當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractDb::__construct方法代碼示例

本文整理匯總了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);
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:13,代碼來源:String.php

示例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);
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:13,代碼來源:Log.php

示例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);
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:13,代碼來源:Visitor.php

示例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);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:14,代碼來源:Option.php

示例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);
 }
開發者ID:Atlis,項目名稱:docker-magento2,代碼行數:15,代碼來源:Value.php

示例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;
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:16,代碼來源:Page.php

示例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;
 }
開發者ID:Atlis,項目名稱:docker-magento2,代碼行數:13,代碼來源:Status.php

示例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);
 }
開發者ID:ddronald,項目名稱:module-translation,代碼行數:14,代碼來源:String.php

示例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);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:14,代碼來源:Fulltext.php

示例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;
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:14,代碼來源:Status.php

示例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);
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:13,代碼來源:Fulltext.php

示例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);
 }
開發者ID:kid17,項目名稱:magento2,代碼行數:16,代碼來源:Engine.php

示例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;
 }
開發者ID:Atlis,項目名稱:docker-magento2,代碼行數:15,代碼來源:User.php

示例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);
 }
開發者ID:Atlis,項目名稱:docker-magento2,代碼行數:13,代碼來源:Translate.php

示例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);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:16,代碼來源:Price.php


注:本文中的Magento\Framework\Model\Resource\Db\AbstractDb::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。