当前位置: 首页>>代码示例>>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;未经允许,请勿转载。