當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。