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


PHP AbstractDb::__construct方法代碼示例

本文整理匯總了PHP中Magento\Framework\Model\ResourceModel\Db\AbstractDb::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractDb::__construct方法的具體用法?PHP AbstractDb::__construct怎麽用?PHP AbstractDb::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Framework\Model\ResourceModel\Db\AbstractDb的用法示例。


在下文中一共展示了AbstractDb::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * constructor
  *
  * @param \Magento\Framework\Stdlib\DateTime\DateTime $date
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  */
 public function __construct(\Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\Model\ResourceModel\Db\Context $context)
 {
     $this->date = $date;
     $this->eventManager = $eventManager;
     parent::__construct($context);
     $this->topicPostTable = $this->getTable('mageplaza_blog_post_topic');
 }
開發者ID:mageplaza,項目名稱:magento-2-blog-extension,代碼行數:14,代碼來源:Topic.php

示例2: __construct

 /**
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Store\Model\WebsiteFactory $websiteFactory
  * @param \Magento\Eav\Model\Config $eavConfig
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Store\Model\WebsiteFactory $websiteFactory, \Magento\Eav\Model\Config $eavConfig, $connectionName = null)
 {
     parent::__construct($context, $connectionName);
     $this->_storeManager = $storeManager;
     $this->_websiteFactory = $websiteFactory;
     $this->eavConfig = $eavConfig;
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:14,代碼來源:Status.php

示例3: __construct

 /**
  * Class constructor
  *
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $config
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\Config\ScopeConfigInterface $config, $connectionName = null)
 {
     $this->_currencyFactory = $currencyFactory;
     $this->_storeManager = $storeManager;
     $this->_config = $config;
     parent::__construct($context, $connectionName);
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:16,代碼來源:Option.php

示例4: __construct

 /**
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Backend\Helper\Js $jsHelper
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param Banner $resourceBanner
  * @param null $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Backend\Helper\Js $jsHelper, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magebase\Carousel\Model\ResourceModel\Banner $resourceBanner, $connectionName = null)
 {
     parent::__construct($context, $connectionName);
     $this->_jsHelper = $jsHelper;
     $this->_storeManager = $storeManager;
     $this->resourceBanner = $resourceBanner;
 }
開發者ID:igor-lero9,項目名稱:magebase_carousel,代碼行數:14,代碼來源:Slider.php

示例5: __construct

 public function __construct(\Ess\M2ePro\Helper\Factory $helperFactory, \Ess\M2ePro\Model\ActiveRecord\Factory $activeRecordFactory, \Ess\M2ePro\Model\ActiveRecord\Component\Parent\Factory $parentFactory, \Magento\Framework\Model\ResourceModel\Db\Context $context, $connectionName = null)
 {
     $this->helperFactory = $helperFactory;
     $this->activeRecordFactory = $activeRecordFactory;
     $this->parentFactory = $parentFactory;
     parent::__construct($context, $connectionName);
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:7,代碼來源:AbstractDb.php

示例6: __construct

 /**
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Catalog\Model\ResourceModel\Category $categoryResource
  * @param \Magento\Framework\Model\Entity\MetadataPool $metadataPool
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\ResourceModel\Category $categoryResource, \Magento\Framework\Model\Entity\MetadataPool $metadataPool, $connectionName = null)
 {
     $this->_storeManager = $storeManager;
     $this->_categoryResource = $categoryResource;
     parent::__construct($context, $connectionName);
     $this->metadataPool = $metadataPool;
 }
開發者ID:BlackIkeEagle,項目名稱:magento2-continuousphp,代碼行數:14,代碼來源:Category.php

示例7: __construct

 /**
  * @param Context $context
  * @param StoreManagerInterface $storeManager
  * @param EntityManager $entityManager
  * @param MetadataPool $metadataPool
  * @param string $connectionName
  */
 public function __construct(Context $context, StoreManagerInterface $storeManager, EntityManager $entityManager, MetadataPool $metadataPool, $connectionName = null)
 {
     $this->_storeManager = $storeManager;
     $this->entityManager = $entityManager;
     $this->metadataPool = $metadataPool;
     parent::__construct($context, $connectionName);
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:14,代碼來源:Block.php

示例8: __construct

 /**
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
  * @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver
  * @param string $connectionName
  * @param string|null $scope
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Framework\App\ScopeResolverInterface $scopeResolver, $connectionName = null, $scope = null)
 {
     $this->_localeResolver = $localeResolver;
     $this->scopeResolver = $scopeResolver;
     $this->scope = $scope;
     parent::__construct($context, $connectionName);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:14,代碼來源:StringUtils.php

示例9: __construct

 /**
  * Resource initialization
  *
  * @param ResourceModel\Db\Context                    $context
  * @param \Magento\Framework\Stdlib\DateTime\DateTime $date
  * @param \Magento\Framework\Filter\FilterManager     $filter
  * @param \Pyvil\Blog\Model\CommentFactory            $commentFactory
  * @param \Magento\Framework\ObjectManagerInterface   $objectManager
  * @param null                                        $resourcePrefix
  */
 public function __construct(ResourceModel\Db\Context $context, \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Framework\Filter\FilterManager $filter, \Magento\Framework\ObjectManagerInterface $objectManager, $resourcePrefix = null)
 {
     parent::__construct($context, $resourcePrefix);
     $this->_date = $date;
     $this->filter = $filter;
     $this->_objectManager = $objectManager;
 }
開發者ID:pyvil,項目名稱:magento2-blog-module,代碼行數:17,代碼來源:Post.php

示例10: __construct

 /**
  * @param \Magento\Framework\Model\ResourceModel\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 $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Review\Model\Rating\Option\VoteFactory $ratingOptionVoteF, \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress, $connectionName = null)
 {
     $this->_customerSession = $customerSession;
     $this->_ratingOptionVoteF = $ratingOptionVoteF;
     $this->_remoteAddress = $remoteAddress;
     parent::__construct($context, $connectionName);
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:14,代碼來源:Option.php

示例11: __construct

 /**
  * Construct
  *
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Framework\Stdlib\DateTime\DateTime $date
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Framework\Stdlib\DateTime $dateTime
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Stdlib\DateTime $dateTime, $connectionName = null)
 {
     parent::__construct($context, $connectionName);
     $this->_date = $date;
     $this->_storeManager = $storeManager;
     $this->dateTime = $dateTime;
 }
開發者ID:AddictedToMagento,項目名稱:dynamic-forms,代碼行數:16,代碼來源:Form.php

示例12: __construct

 /**
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Catalog\Model\Config $catalogConfig
  * @param \Magento\Catalog\Model\Product\Attribute\DefaultAttributes $defaultAttributes
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Config $catalogConfig, \Magento\Catalog\Model\Product\Attribute\DefaultAttributes $defaultAttributes, $connectionName = null)
 {
     $this->_storeManager = $storeManager;
     $this->_catalogConfig = $catalogConfig;
     $this->defaultAttributes = $defaultAttributes;
     parent::__construct($context, $connectionName);
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:14,代碼來源:Flat.php

示例13: __construct

 /**
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Framework\Acl\Builder $aclBuilder
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Acl\RootResource $rootResource
  * @param \Magento\Framework\Acl\CacheInterface $aclCache
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\Acl\Builder $aclBuilder, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Acl\RootResource $rootResource, \Magento\Framework\Acl\CacheInterface $aclCache, $connectionName = null)
 {
     $this->_aclBuilder = $aclBuilder;
     parent::__construct($context, $connectionName);
     $this->_rootResource = $rootResource;
     $this->_aclCache = $aclCache;
     $this->_logger = $logger;
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:16,代碼來源:Rules.php

示例14: __construct

 /**
  * Class constructor
  *
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Persistent\Model\SessionFactory $sessionFactory
  * @param string $connectionName
  */
 public function __construct(
     \Magento\Framework\Model\ResourceModel\Db\Context $context,
     \Magento\Persistent\Model\SessionFactory $sessionFactory,
     $connectionName = null
 ) {
     $this->_sessionFactory = $sessionFactory;
     parent::__construct($context, $connectionName);
 }
開發者ID:razbakov,項目名稱:magento2,代碼行數:15,代碼來源:Session.php

示例15: __construct

 /**
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Module\Manager $moduleManager
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Review\Model\ResourceModel\Review\Summary $reviewSummary
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Module\Manager $moduleManager, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Review\Model\ResourceModel\Review\Summary $reviewSummary, $connectionName = null)
 {
     $this->moduleManager = $moduleManager;
     $this->_storeManager = $storeManager;
     $this->_logger = $logger;
     $this->_reviewSummary = $reviewSummary;
     parent::__construct($context, $connectionName);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:16,代碼來源:Rating.php


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