本文整理汇总了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');
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}