当前位置: 首页>>代码示例>>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;未经允许,请勿转载。