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