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


PHP Object::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Construct
  *
  * @param \Magento\Eav\Model\Resource\Entity\Attribute $eavEntityAttribute
  * @param \Magento\Core\Helper\Data $coreData
  * @param array $data
  */
 public function __construct(\Magento\Eav\Model\Resource\Entity\Attribute $eavEntityAttribute, \Magento\Core\Helper\Data $coreData, array $data = array())
 {
     $this->_eavEntityAttribute = $eavEntityAttribute;
     $this->_coreData = $coreData;
     parent::__construct($data);
     $this->setIdFieldName('visibility_id');
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:14,代码来源:Visibility.php

示例2: __construct

 /**
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
  * @param \Psr\Log\LoggerInterface $logger
  * @param array $data
  */
 public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, \Psr\Log\LoggerInterface $logger, array $data = [])
 {
     parent::__construct($data);
     $this->_scopeConfig = $scopeConfig;
     $this->_rateErrorFactory = $rateErrorFactory;
     $this->_logger = $logger;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:13,代码来源:AbstractCarrier.php

示例3: __construct

 /**
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Framework\App\Filesystem $filesystem
  * @param \Magento\Framework\Logger\AdapterFactory $adapterFactory
  * @param array $data
  */
 public function __construct(\Magento\Framework\Logger $logger, \Magento\Framework\App\Filesystem $filesystem, \Magento\Framework\Logger\AdapterFactory $adapterFactory, array $data = array())
 {
     $this->_logger = $logger;
     $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
     $this->_adapterFactory = $adapterFactory;
     parent::__construct($data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:13,代码来源:AbstractModel.php

示例4: __construct

 /**
  * Initialize dependencies
  *
  * @param \Magento\Tax\Helper\Data $taxHelper
  * @param \Magento\Tax\Model\Calculation $taxCalculation
  * @param \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory $ordersFactory
  * @param array $data
  */
 public function __construct(\Magento\Tax\Helper\Data $taxHelper, \Magento\Tax\Model\Calculation $taxCalculation, \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory $ordersFactory, array $data = [])
 {
     $this->_taxHelper = $taxHelper;
     $this->_taxCalculation = $taxCalculation;
     $this->_taxOrdersFactory = $ordersFactory;
     parent::__construct($data);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:15,代码来源:DefaultTotal.php

示例5: __construct

 /**
  * Constructor
  *
  * @param RenderContext $renderContext
  * @param LayoutFactory $layoutFactory
  * @param array $data
  */
 public function __construct(RenderContext $renderContext, LayoutFactory $layoutFactory, array $data = [])
 {
     $this->renderContext = $renderContext;
     $this->renderContext->setRender($this);
     $this->layoutFactory = $layoutFactory;
     parent::__construct($data);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:14,代码来源:UiComponentFactory.php

示例6: __construct

 /**
  * @param Factory $factoryElement
  * @param CollectionFactory $factoryCollection
  * @param array $data
  */
 public function __construct(Factory $factoryElement, CollectionFactory $factoryCollection, $data = [])
 {
     $this->_factoryElement = $factoryElement;
     $this->_factoryCollection = $factoryCollection;
     parent::__construct($data);
     $this->_construct();
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:12,代码来源:AbstractForm.php

示例7: __construct

 /**
  * @param \Magento\Framework\Registry $coreRegistry
  * @param \Magento\Email\Model\Resource\Template\CollectionFactory $templatesFactory
  * @param \Magento\Email\Model\Template\Config $emailConfig
  * @param array $data
  */
 public function __construct(\Magento\Framework\Registry $coreRegistry, \Magento\Email\Model\Resource\Template\CollectionFactory $templatesFactory, \Magento\Email\Model\Template\Config $emailConfig, array $data = [])
 {
     parent::__construct($data);
     $this->_coreRegistry = $coreRegistry;
     $this->_templatesFactory = $templatesFactory;
     $this->_emailConfig = $emailConfig;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:13,代码来源:Template.php

示例8: __construct

 /**
  * Constructor
  *
  * @param ObjectManagerInterface $objectManager
  * @param ManagerInterface $componentManager
  * @param InterpreterInterface $argumentInterpreter
  * @param array $data
  */
 public function __construct(ObjectManagerInterface $objectManager, ManagerInterface $componentManager, InterpreterInterface $argumentInterpreter, array $data = [])
 {
     $this->objectManager = $objectManager;
     $this->componentManager = $componentManager;
     $this->argumentInterpreter = $argumentInterpreter;
     parent::__construct($data);
 }
开发者ID:opexsw,项目名称:magento2,代码行数:15,代码来源:UiComponentFactory.php

示例9: __construct

 /**
  *
  * @param \Inchoo\SocialConnect\Model\Facebook\Oauth2\Client $client
  * @param array $params
  * @param string $target
  * @param array $data
  */
 public function __construct(\Inchoo\SocialConnect\Model\Facebook\Oauth2\Client $client, array $params = array(), $target = 'me', array $data = array())
 {
     $this->_client = $client;
     $this->_params = $params;
     $this->_target = $target;
     parent::__construct($data);
 }
开发者ID:LavoWeb,项目名称:Magento2-Inchoo_SocialConnect,代码行数:14,代码来源:Info.php

示例10: __construct

 /**
  * Constructor
  *
  * By default is looking for first argument as array and assigns it as object
  * attributes This behavior may change in child classes
  *
  * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory
  * @param \Magento\Framework\Registry $coreRegistry
  * @param \Magento\GoogleShopping\Model\Config $config
  * @param \Magento\Framework\Gdata\Gshopping\ContentFactory $contentFactory
  * @param array $data
  */
 public function __construct(\Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Framework\Registry $coreRegistry, \Magento\GoogleShopping\Model\Config $config, \Magento\Framework\Gdata\Gshopping\ContentFactory $contentFactory, array $data = array())
 {
     $this->_logAdapterFactory = $logAdapterFactory;
     $this->_coreRegistry = $coreRegistry;
     $this->_config = $config;
     $this->_contentFactory = $contentFactory;
     parent::__construct($data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:20,代码来源:Service.php

示例11: __construct

 /**
  * @param \Magento\Framework\App\RequestInterface $request
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Framework\Url\QueryParamsResolverInterface $queryParamsResolver
  * @param array $data
  */
 public function __construct(\Magento\Framework\App\RequestInterface $request, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Url\QueryParamsResolverInterface $queryParamsResolver, array $data = array())
 {
     parent::__construct($data);
     $this->_request = $request;
     $this->_scopeConfig = $scopeConfig;
     $this->_storeManager = $storeManager;
     $this->_queryParamsResolver = $queryParamsResolver;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:15,代码来源:RouteParamsResolver.php

示例12: __construct

 /**
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Registry $coreRegistry
  * @param Config $config
  * @param \Magento\Framework\Gdata\Gshopping\ContentFactory $contentFactory
  * @param array $data
  */
 public function __construct(\Psr\Log\LoggerInterface $logger, \Magento\Framework\Registry $coreRegistry, \Magento\GoogleShopping\Model\Config $config, \Magento\Framework\Gdata\Gshopping\ContentFactory $contentFactory, array $data = [])
 {
     $this->logger = $logger;
     $this->_coreRegistry = $coreRegistry;
     $this->_config = $config;
     $this->_contentFactory = $contentFactory;
     parent::__construct($data);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:15,代码来源:Service.php

示例13: __construct

 /**
  * @param \Magento\Shipping\Helper\Data $shippingData
  * @param \Magento\Sales\Model\OrderFactory $orderFactory
  * @param \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory
  * @param \Magento\Shipping\Model\Order\TrackFactory $trackFactory
  * @param \Magento\Shipping\Model\Resource\Order\Track\CollectionFactory $trackCollectionFactory
  * @param array $data
  */
 public function __construct(\Magento\Shipping\Helper\Data $shippingData, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory, \Magento\Shipping\Model\Order\TrackFactory $trackFactory, \Magento\Shipping\Model\Resource\Order\Track\CollectionFactory $trackCollectionFactory, array $data = array())
 {
     $this->_shippingData = $shippingData;
     $this->_orderFactory = $orderFactory;
     $this->_shipmentFactory = $shipmentFactory;
     $this->_trackFactory = $trackFactory;
     $this->_trackCollectionFactory = $trackCollectionFactory;
     parent::__construct($data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:17,代码来源:Info.php

示例14: __construct

 /**
  * Constructor
  *
  * @param \Magento\Catalog\Model\Product\Compare\ItemFactory $compareItemFactory
  * @param \Magento\Catalog\Model\Resource\Product\Compare\Item\CollectionFactory $itemCollectionFactory
  * @param \Magento\Catalog\Model\Resource\Product\Compare\Item $catalogProductCompareItem
  * @param \Magento\Customer\Model\Session $customerSession
  * @param \Magento\Customer\Model\Visitor $customerVisitor
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Model\Product\Compare\ItemFactory $compareItemFactory, \Magento\Catalog\Model\Resource\Product\Compare\Item\CollectionFactory $itemCollectionFactory, \Magento\Catalog\Model\Resource\Product\Compare\Item $catalogProductCompareItem, \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Model\Visitor $customerVisitor, array $data = [])
 {
     $this->_compareItemFactory = $compareItemFactory;
     $this->_itemCollectionFactory = $itemCollectionFactory;
     $this->_catalogProductCompareItem = $catalogProductCompareItem;
     $this->_customerSession = $customerSession;
     $this->_customerVisitor = $customerVisitor;
     parent::__construct($data);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:19,代码来源:ListCompare.php

示例15: __construct

 /**
  * @param ConfigInterface $config
  * @param ActionFactory $actionFactory
  * @param \Magento\Framework\Mview\ViewInterface $view
  * @param Indexer\StateFactory $stateFactory
  * @param Indexer\CollectionFactory $indexersFactory
  * @param array $data
  */
 public function __construct(ConfigInterface $config, ActionFactory $actionFactory, \Magento\Framework\Mview\ViewInterface $view, Indexer\StateFactory $stateFactory, Indexer\CollectionFactory $indexersFactory, array $data = [])
 {
     $this->config = $config;
     $this->actionFactory = $actionFactory;
     $this->view = $view;
     $this->stateFactory = $stateFactory;
     $this->indexersFactory = $indexersFactory;
     parent::__construct($data);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:17,代码来源:Indexer.php


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