當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractModel::__construct方法代碼示例

本文整理匯總了PHP中Magento\Framework\Model\AbstractModel::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractModel::__construct方法的具體用法?PHP AbstractModel::__construct怎麽用?PHP AbstractModel::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Framework\Model\AbstractModel的用法示例。


在下文中一共展示了AbstractModel::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * @param JobFactory $jobFactory
  * @param JobCollection $jobCollection
  * @param Context $context
  * @param Registry $registry
  */
 public function __construct(JobFactory $jobFactory, JobCollection $jobCollection, Context $context, Registry $registry)
 {
     $this->_init('Springbot\\Queue\\Model\\ResourceModel\\Job');
     $this->jobFactory = $jobFactory;
     $this->jobCollection = $jobCollection;
     parent::__construct($context, $registry);
 }
開發者ID:springbot,項目名稱:magento2-queue,代碼行數:13,代碼來源:Queue.php

示例2: __construct

 /**
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Tax\Helper\Data $taxData
  * @param \Magento\Framework\Filesystem $filesystem ,
  * @param \Magento\Framework\Filter\FilterManager $filterManager
  * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
  * @param array $data
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\Filter\FilterManager $filterManager, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->filterManager = $filterManager;
     $this->_taxData = $taxData;
     $this->_rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:17,代碼來源:AbstractItems.php

示例3: __construct

 public function __construct(\Ess\M2ePro\Model\Factory $modelFactory, \Ess\M2ePro\Model\ActiveRecord\Factory $activeRecordFactory, \Ess\M2ePro\Helper\Factory $helperFactory, \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->modelFactory = $modelFactory;
     $this->activeRecordFactory = $activeRecordFactory;
     $this->helperFactory = $helperFactory;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:7,代碼來源:AbstractModel.php

示例4: __construct

 /**
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Catalog\Model\ResourceModel\Product\Link\CollectionFactory $linkCollectionFactory
  * @param \Magento\Catalog\Model\ResourceModel\Product\Link\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\Catalog\Model\Product\Link\SaveHandler $saveProductLinks
  * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
  * @param array $data
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Catalog\Model\ResourceModel\Product\Link\CollectionFactory $linkCollectionFactory, \Magento\Catalog\Model\ResourceModel\Product\Link\Product\CollectionFactory $productCollectionFactory, \Magento\Catalog\Model\Product\Link\SaveHandler $saveProductLinks, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->_linkCollectionFactory = $linkCollectionFactory;
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->saveProductLinks = $saveProductLinks;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:Zash22,項目名稱:magento,代碼行數:17,代碼來源:Link.php

示例5: __construct

 /**
  * Automation constructor.
  *
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Framework\Stdlib\DateTime $dateTime
  * @param \Dotdigitalgroup\Email\Helper\Data $helper
  * @param \Magento\Store\Model\StoreManagerInterface $storeManagerInterface
  * @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb|null $resourceCollection
  * @param array $data
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Stdlib\DateTime $dateTime, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Store\Model\StoreManagerInterface $storeManagerInterface, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->dateTime = $dateTime;
     $this->helper = $helper;
     $this->storeManager = $storeManagerInterface;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:dotmailer,項目名稱:dotmailer-magento2-extension,代碼行數:19,代碼來源:Automation.php

示例6: __construct

 /**
  * Export constructor.
  * @param ProductFactory $productFactory
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb|null $resourceCollection
  * @param array $data
  */
 public function __construct(ProductFactory $productFactory, \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, ExportFactory $exportFactory, PersonalisedProductsLogger $logger, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->_productFactory = $productFactory;
     $this->_exportFactory = $exportFactory;
     $this->_logger = $logger;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:richdynamix,項目名稱:personalised-products,代碼行數:16,代碼來源:Export.php

示例7: __construct

 /**
  * Rules constructor.
  *
  * @param Adminhtml\Source\Rules\Type                                  $rulesType
  * @param \Magento\Framework\Model\Context                             $context
  * @param \Magento\Framework\Registry                                  $registry
  * @param \Magento\Eav\Model\Config                                    $config
  * @param \Magento\Framework\App\ResourceConnection                    $resourceConnection
  * @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb|null           $resourceCollection
  * @param array                                                        $data
  */
 public function __construct(\Dotdigitalgroup\Email\Model\Adminhtml\Source\Rules\Type $rulesType, \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Eav\Model\Config $config, \Magento\Framework\App\ResourceConnection $resourceConnection, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->coreResource = $resourceConnection;
     $this->config = $config;
     $this->rulesType = $rulesType;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:dotmailer,項目名稱:dotmailer-magento2-extension,代碼行數:19,代碼來源:Rules.php

示例8: __construct

 /**
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Tax\Model\ClassModel $taxClass
  * @param \Magento\Tax\Model\Calculation $calculation
  * @param \Magento\Framework\Model\Resource\AbstractResource $resource
  * @param \Magento\Framework\Data\Collection\Db $resourceCollection
  * @param array $data
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Tax\Model\ClassModel $taxClass, \Magento\Tax\Model\Calculation $calculation, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array())
 {
     $this->_calculation = $calculation;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     $this->_init('Magento\\Tax\\Model\\Resource\\Calculation\\Rule');
     $this->_taxClass = $taxClass;
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:16,代碼來源:Rule.php

示例9: __construct

 /**
  * Initialize dependencies.
  *
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magefan\Blog\Model\PostFactory $postFactory,
  * @param \Magefan\Blog\Model\CategoryFactory $categoryFactory,
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager,
  * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
  * @param array $data
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magefan\Blog\Model\PostFactory $postFactory, \Magefan\Blog\Model\CategoryFactory $categoryFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->_postFactory = $postFactory;
     $this->_categoryFactory = $categoryFactory;
     $this->_storeManager = $storeManager;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:magefan,項目名稱:module-blog,代碼行數:19,代碼來源:AbstractImport.php

示例10: __construct

 /**
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Integration\Model\Oauth\Consumer\Validator\KeyLength $keyLength
  * @param \Magento\Framework\Url\Validator $urlValidator
  * @param \Magento\Integration\Helper\Oauth\Data $dataHelper
  * @param \Magento\Framework\Model\ModelResource\AbstractResource $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
  * @param array $data
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Integration\Model\Oauth\Consumer\Validator\KeyLength $keyLength, \Magento\Framework\Url\Validator $urlValidator, \Magento\Integration\Helper\Oauth\Data $dataHelper, \Magento\Framework\Model\ModelResource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->keyLengthValidator = $keyLength;
     $this->urlValidator = $urlValidator;
     $this->dataHelper = $dataHelper;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:whoople,項目名稱:magento2-testing,代碼行數:17,代碼來源:Consumer.php

示例11: __construct

 /**
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Framework\Locale\ListsInterface $localeLists
  * @param Country\FormatFactory $formatFactory
  * @param \Magento\Directory\Model\ResourceModel\Region\CollectionFactory $regionCollectionFactory
  * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
  * @param array $data
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Locale\ListsInterface $localeLists, \Magento\Directory\Model\Country\FormatFactory $formatFactory, \Magento\Directory\Model\ResourceModel\Region\CollectionFactory $regionCollectionFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     $this->_localeLists = $localeLists;
     $this->_formatFactory = $formatFactory;
     $this->_regionCollectionFactory = $regionCollectionFactory;
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:17,代碼來源:Country.php

示例12: __construct

 /**
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Indexer\Model\Resource\Indexer\State $resource
  * @param \Magento\Indexer\Model\Resource\Indexer\State\Collection $resourceCollection
  * @param array $data
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Indexer\Model\Resource\Indexer\State $resource, \Magento\Indexer\Model\Resource\Indexer\State\Collection $resourceCollection, array $data = [])
 {
     if (!isset($data['status'])) {
         $data['status'] = self::STATUS_INVALID;
     }
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:14,代碼來源:State.php

示例13: __construct

 /**
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Catalog\Model\ResourceModel\Product\Link\CollectionFactory $linkCollectionFactory
  * @param \Magento\Catalog\Model\ResourceModel\Product\Link\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\CatalogInventory\Helper\Stock $stockHelper
  * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
  * @param array $data
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Catalog\Model\ResourceModel\Product\Link\CollectionFactory $linkCollectionFactory, \Magento\Catalog\Model\ResourceModel\Product\Link\Product\CollectionFactory $productCollectionFactory, \Magento\CatalogInventory\Helper\Stock $stockHelper, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->_linkCollectionFactory = $linkCollectionFactory;
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->stockHelper = $stockHelper;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:17,代碼來源:Link.php

示例14: __construct

 /**
  * Constructor
  *
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Store\Model\StoresConfig $storesConfig
  * @param \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor
  * @param \Magento\Tax\Model\ClassModelFactory $classModelFactory
  * @param \Magento\Framework\Model\ModelResource\AbstractResource $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
  * @param array $data
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Store\Model\StoresConfig $storesConfig, \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor, \Magento\Tax\Model\ClassModelFactory $classModelFactory, \Magento\Framework\Model\ModelResource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->_storesConfig = $storesConfig;
     $this->dataObjectProcessor = $dataObjectProcessor;
     $this->classModelFactory = $classModelFactory;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:whoople,項目名稱:magento2-testing,代碼行數:20,代碼來源:Group.php

示例15: __construct

 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Smart2Pay\GlobalPay\Model\CountryMethodFactory $countryMethodFactory, \Smart2Pay\GlobalPay\Model\CountryFactory $countryFactory, \Smart2Pay\GlobalPay\Model\MethodFactory $methodFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     $this->_countryMethodFactory = $countryMethodFactory;
     $this->_countryFactory = $countryFactory;
     $this->_methodFactory = $methodFactory;
     parent::__construct($context, $registry, $resource, $resourceCollection, $data);
 }
開發者ID:smart2pay,項目名稱:magento20,代碼行數:7,代碼來源:ConfiguredMethods.php


注:本文中的Magento\Framework\Model\AbstractModel::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。