本文整理汇总了PHP中Magento\Framework\Data\Collection::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Collection::__construct方法的具体用法?PHP Collection::__construct怎么用?PHP Collection::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\Data\Collection
的用法示例。
在下文中一共展示了Collection::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
* @param \Magento\Framework\Config\ThemeFactory $themeConfigFactory
* @param ThemePackageList $themePackageList
* @param ReadFactory $dirReadFactory
*/
public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Magento\Framework\Config\ThemeFactory $themeConfigFactory, ThemePackageList $themePackageList, ReadFactory $dirReadFactory)
{
parent::__construct($entityFactory);
$this->themeConfigFactory = $themeConfigFactory;
$this->themePackageList = $themePackageList;
$this->dirReadFactory = $dirReadFactory;
}
示例2: __construct
/**
* @param EntityFactoryInterface $entityFactory
* @param FilterBuilder $filterBuilder
* @param SearchCriteriaBuilder $searchCriteriaBuilder
* @param \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder
*/
public function __construct(EntityFactoryInterface $entityFactory, FilterBuilder $filterBuilder, SearchCriteriaBuilder $searchCriteriaBuilder, SortOrderBuilder $sortOrderBuilder)
{
parent::__construct($entityFactory);
$this->filterBuilder = $filterBuilder;
$this->searchCriteriaBuilder = $searchCriteriaBuilder;
$this->sortOrderBuilder = $sortOrderBuilder;
}
示例3: __construct
/**
* Collection constructor
*
* @param EntityFactoryInterface $entityFactory
* @param ScopeTreeProviderInterface $scopeTree
* @param MetadataProviderInterface $metadataProvider
* @param ScopeConfigInterface $appConfig
* @param ValueProcessor $valueProcessor
*/
public function __construct(EntityFactoryInterface $entityFactory, ScopeTreeProviderInterface $scopeTree, MetadataProviderInterface $metadataProvider, ScopeConfigInterface $appConfig, ValueProcessor $valueProcessor)
{
parent::__construct($entityFactory);
$this->scopeTree = $scopeTree;
$this->metadataProvider = $metadataProvider;
$this->appConfig = $appConfig;
$this->valueProcessor = $valueProcessor;
}
示例4: __construct
/**
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Framework\Config\ThemeFactory $themeConfigFactory
*/
public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\Config\ThemeFactory $themeConfigFactory, \Magento\Framework\Module\ThemeDir $themeDirs)
{
parent::__construct($entityFactory);
$this->_directory = $filesystem->getDirectoryRead(DirectoryList::THEMES);
$this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
$this->themeConfigFactory = $themeConfigFactory;
$this->themeDirs = $themeDirs;
}
示例5: __construct
/**
* @param EntityFactoryInterface $entityFactory
* @param Logger $logger
* @param FetchStrategyInterface $fetchStrategy
* @param \Zend_Db_Adapter_Abstract $connection
*/
public function __construct(EntityFactoryInterface $entityFactory, Logger $logger, FetchStrategyInterface $fetchStrategy, $connection = null)
{
parent::__construct($entityFactory);
$this->_fetchStrategy = $fetchStrategy;
if (!is_null($connection)) {
$this->setConnection($connection);
}
$this->_logger = $logger;
}
示例6: __construct
/**
* @param EntityFactoryInterface $entityFactory
* @param Logger $logger
* @param FetchStrategyInterface $fetchStrategy
* @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
*/
public function __construct(EntityFactoryInterface $entityFactory, Logger $logger, FetchStrategyInterface $fetchStrategy, \Magento\Framework\DB\Adapter\AdapterInterface $connection = null)
{
parent::__construct($entityFactory);
$this->_fetchStrategy = $fetchStrategy;
if ($connection !== null) {
$this->setConnection($connection);
}
$this->_logger = $logger;
}
示例7: __construct
/**
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Reports\Model\ResourceModel\Report\Collection\Factory $collectionFactory
*/
public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Reports\Model\ResourceModel\Report\Collection\Factory $collectionFactory)
{
$this->_localeDate = $localeDate;
$this->_collectionFactory = $collectionFactory;
parent::__construct($entityFactory);
}
示例8: __construct
/**
* @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory
* @param \Magento\Framework\Mview\ConfigInterface $config
* @param State\CollectionFactory $statesFactory
*/
public function __construct(\Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, \Magento\Framework\Mview\ConfigInterface $config, \Magento\Framework\Mview\View\State\CollectionFactory $statesFactory)
{
$this->config = $config;
$this->statesFactory = $statesFactory;
parent::__construct($entityFactory);
}
示例9: __construct
/**
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Reports\Model\FlagFactory $reportsFlagFactory
*/
public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Reports\Model\FlagFactory $reportsFlagFactory)
{
parent::__construct($entityFactory);
$this->_localeDate = $localeDate;
$this->_reportsFlagFactory = $reportsFlagFactory;
}
示例10: __construct
/**
* @param EntityFactoryInterface $entityFactory
* @param BraintreeAdapter $braintreeAdapter
* @param FilterMapper $filterMapper
*/
public function __construct(EntityFactoryInterface $entityFactory, BraintreeAdapter $braintreeAdapter, FilterMapper $filterMapper)
{
parent::__construct($entityFactory);
$this->filterMapper = $filterMapper;
$this->braintreeAdapter = $braintreeAdapter;
}
示例11: __construct
/**
* @param \Magento\Core\Model\EntityFactory $entityFactory
* @param \Magento\Framework\Stdlib\DateTime $dateTime
*/
public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Stdlib\DateTime $dateTime)
{
$this->dateTime = $dateTime;
parent::__construct($entityFactory);
}
示例12: __construct
/**
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
*/
public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList)
{
$this->_cacheTypeList = $cacheTypeList;
parent::__construct($entityFactory);
}
示例13: __construct
/**
* @param \Magento\Core\Model\EntityFactory $entityFactory
* @param \Magento\Framework\Filesystem $filesystem
*/
public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Filesystem $filesystem)
{
parent::__construct($entityFactory);
$this->_directory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::THEMES_DIR);
}
示例14: __construct
/**
* @param EntityFactoryInterface $entityFactory
* @param \Magento\Framework\App\RequestInterface $request
*/
public function __construct(EntityFactoryInterface $entityFactory, RequestInterface $request)
{
$this->_request = $request;
parent::__construct($entityFactory);
}
示例15: __construct
/**
* @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory
* @param \Magento\Framework\Indexer\ConfigInterface $config
* @param \Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory $statesFactory
*/
public function __construct(\Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, \Magento\Framework\Indexer\ConfigInterface $config, \Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory $statesFactory)
{
$this->config = $config;
$this->statesFactory = $statesFactory;
parent::__construct($entityFactory);
}