当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractCollection::__construct方法代码示例

本文整理汇总了PHP中Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractCollection::__construct方法的具体用法?PHP AbstractCollection::__construct怎么用?PHP AbstractCollection::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Framework\Model\Resource\Db\Collection\AbstractCollection的用法示例。


在下文中一共展示了AbstractCollection::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Quote\Model\Resource\Quote\Item\Option\CollectionFactory $itemOptionCollectionFactory
  * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\Quote\Model\Quote\Config $quoteConfig
  * @param \Zend_Db_Adapter_Abstract $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Quote\Model\Resource\Quote\Item\Option\CollectionFactory $itemOptionCollectionFactory, \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory, \Magento\Quote\Model\Quote\Config $quoteConfig, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->_itemOptionCollectionFactory = $itemOptionCollectionFactory;
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->_quoteConfig = $quoteConfig;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:18,代码来源:Collection.php

示例2: __construct

 /**
  * @param \Magento\Core\Model\EntityFactory $entityFactory
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Framework\StoreManagerInterface $storeManager
  * @param \Magento\ConfigurableProduct\Model\Product\Type\Configurable $catalogProductTypeConfigurable
  * @param \Magento\Catalog\Helper\Data $catalogData
  * @param \Magento\ConfigurableProduct\Model\Resource\Product\Type\Configurable\Attribute $resource
  * @param \Zend_Db_Adapter_Abstract $connection
  */
 public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Logger $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\StoreManagerInterface $storeManager, \Magento\ConfigurableProduct\Model\Product\Type\Configurable $catalogProductTypeConfigurable, \Magento\Catalog\Helper\Data $catalogData, \Magento\ConfigurableProduct\Model\Resource\Product\Type\Configurable\Attribute $resource, $connection = null)
 {
     $this->_storeManager = $storeManager;
     $this->_productTypeConfigurable = $catalogProductTypeConfigurable;
     $this->_catalogData = $catalogData;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:pavelnovitsky,项目名称:magento2,代码行数:18,代码来源:Collection.php

示例3: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Catalog\Model\Resource\Product\Collection $productResource
  * @param \Magento\Customer\Model\Resource\Customer $customerResource
  * @param \Magento\Sales\Model\Resource\Order\Collection $orderResource
  * @param \Zend_Db_Adapter_Abstract $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Catalog\Model\Resource\Product\Collection $productResource, \Magento\Customer\Model\Resource\Customer $customerResource, \Magento\Sales\Model\Resource\Order\Collection $orderResource, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->productResource = $productResource;
     $this->customerResource = $customerResource;
     $this->orderResource = $orderResource;
 }
开发者ID:nja78,项目名称:magento2,代码行数:18,代码来源:Collection.php

示例4: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Review\Helper\Data $reviewData
  * @param \Magento\Review\Model\Rating\Option\VoteFactory $voteFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param mixed $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Review\Helper\Data $reviewData, \Magento\Review\Model\Rating\Option\VoteFactory $voteFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     $this->_reviewData = $reviewData;
     $this->_voteFactory = $voteFactory;
     $this->_storeManager = $storeManager;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:opexsw,项目名称:magento2,代码行数:18,代码来源:Collection.php

示例5: __construct

 /**
  * @constructor
  * @param \Magento\Core\Model\EntityFactory $entityFactory
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param null $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  * @param array $fixture
  */
 public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Logger $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null, array $fixture = [])
 {
     $this->setModel('Magento\\Framework\\Object');
     $this->setResourceModel('Mtf\\Util\\Generate\\Repository\\Resource');
     $resource = $this->getResource();
     $resource->setFixture($fixture);
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:18,代码来源:TableCollection.php

示例6: __construct

 /**
  * @param \Magento\Core\Model\EntityFactory $entityFactory
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Framework\Locale\ListsInterface $localeLists
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Directory\Model\Resource\CountryFactory $countryFactory
  * @param \Magento\Framework\Stdlib\ArrayUtils $arrayUtils
  * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
  * @param mixed $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Logger $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\Locale\ListsInterface $localeLists, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Directory\Model\Resource\CountryFactory $countryFactory, \Magento\Framework\Stdlib\ArrayUtils $arrayUtils, \Magento\Framework\Locale\ResolverInterface $localeResolver, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->_scopeConfig = $scopeConfig;
     $this->_localeLists = $localeLists;
     $this->_localeResolver = $localeResolver;
     $this->_countryFactory = $countryFactory;
     $this->_arrayUtils = $arrayUtils;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:22,代码来源:Collection.php

示例7: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Framework\Stdlib\DateTime\DateTime $date
  * @param null|\Zend_Db_Adapter_Abstract $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\Stdlib\DateTime\DateTime $date, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->_date = $date;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:14,代码来源:Collection.php

示例8: __construct

 /**
  * @param \Magento\Core\Model\EntityFactory $entityFactory
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Framework\App\Resource $coreResource
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param mixed $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Logger $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\App\Resource $coreResource, \Magento\Store\Model\StoreManagerInterface $storeManager, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     $this->_storeManager = $storeManager;
     $this->_coreResource = $coreResource;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:16,代码来源:Collection.php

示例9: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Shipping\Model\CarrierFactoryInterface $carrierFactory
  * @param \Zend_Db_Adapter_Abstract $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Shipping\Model\CarrierFactoryInterface $carrierFactory, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->_carrierFactory = $carrierFactory;
 }
开发者ID:opexsw,项目名称:magento2,代码行数:14,代码来源:Collection.php

示例10: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Catalog\Model\Resource\Product\Option\Value\CollectionFactory $optionValueCollectionFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Zend_Db_Adapter_Abstract $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Catalog\Model\Resource\Product\Option\Value\CollectionFactory $optionValueCollectionFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     $this->_optionValueCollectionFactory = $optionValueCollectionFactory;
     $this->_storeManager = $storeManager;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:16,代码来源:Collection.php

示例11: __construct

 /**
  * @param \Magento\Core\Model\EntityFactory $entityFactory
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData
  * @param \Magento\Sales\Helper\Admin $adminhtmlSales
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Framework\Stdlib\DateTime\DateTime $date
  * @param \Magento\Wishlist\Model\Config $wishlistConfig
  * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
  * @param \Magento\Framework\App\Resource $coreResource
  * @param \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollectionFactory
  * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory
  * @param \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory
  * @param \Magento\Wishlist\Model\Resource\Item $resource
  * @param \Magento\Framework\App\State $appState
  * @param \Zend_Db_Adapter_Abstract $connection
  * 
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Logger $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\CatalogInventory\Helper\Data $catalogInventoryData, \Magento\Sales\Helper\Admin $adminhtmlSales, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Wishlist\Model\Config $wishlistConfig, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Framework\App\Resource $coreResource, \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollectionFactory, \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory, \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory, \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory, \Magento\Wishlist\Model\Resource\Item $resource, \Magento\Framework\App\State $appState, $connection = null)
 {
     $this->_inventoryData = $catalogInventoryData;
     $this->_adminhtmlSales = $adminhtmlSales;
     $this->_storeManager = $storeManager;
     $this->_date = $date;
     $this->_wishlistConfig = $wishlistConfig;
     $this->_productVisibility = $productVisibility;
     $this->_coreResource = $coreResource;
     $this->_optionCollectionFactory = $optionCollectionFactory;
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->_catalogConfFactory = $catalogConfFactory;
     $this->_catalogAttrFactory = $catalogAttrFactory;
     $this->_appState = $appState;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:38,代码来源:Collection.php

示例12: __construct

 /**
  * @param \Magento\Core\Model\EntityFactory $entityFactory
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Core\Model\Resource\Config\Data $resource
  * @param string $scope
  * @param mixed $connection
  * @param mixed $scopeId
  */
 public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Logger $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Core\Model\Resource\Config\Data $resource, $scope, $connection = null, $scopeId = null)
 {
     $this->_scope = $scope;
     $this->_scopeId = $scopeId;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:16,代码来源:Scoped.php

示例13: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\Customer\Model\Resource\Customer $customerResource
  * @param \Magento\Eav\Helper\Data $eavHelper
  * @param mixed $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Framework\Data\Collection\EntityFactory $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Customer\Model\Resource\Customer $customerResource, \Magento\Eav\Helper\Data $eavHelper, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
     $this->_eavHelper = $eavHelper;
     $this->_customerResource = $customerResource;
 }
开发者ID:nja78,项目名称:magento2,代码行数:16,代码来源:Collection.php

示例14: __construct

 /**
  * @param \Magento\Core\Model\EntityFactory $entityFactory
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\AdminNotification\Model\System\MessageList $messageList
  * @param mixed $connection
  * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
  */
 public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Logger $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\AdminNotification\Model\System\MessageList $messageList, $connection = null, \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null)
 {
     $this->_messageList = $messageList;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:14,代码来源:Collection.php

示例15: __construct

 /**
  * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
  * @param Logger $logger
  * @param FetchStrategyInterface $fetchStrategy
  * @param ManagerInterface $eventManager
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Zend_Db_Adapter_Abstract $connection
  * @param AbstractDb $resource
  */
 public function __construct(EntityFactory $entityFactory, Logger $logger, FetchStrategyInterface $fetchStrategy, ManagerInterface $eventManager, StoreManagerInterface $storeManager, $connection = null, AbstractDb $resource = null)
 {
     $this->_storeManager = $storeManager;
     parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:14,代码来源:Collection.php


注:本文中的Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。