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


PHP Template::__construct方法代碼示例

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


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

示例1: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context          $context
  * @param \Magento\Customer\Model\Config\Share             $shareConfig
  * @param \Magento\Customer\Api\Data\CustomerInterfaceFactory $customerDataFactory
  * @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper
  * @param array                                            $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Customer\Model\Config\Share $shareConfig, \Magento\Customer\Api\Data\CustomerInterfaceFactory $customerDataFactory, \Magento\Framework\Api\DataObjectHelper $dataObjectHelper, array $data = [])
 {
     $this->_shareConfig = $shareConfig;
     $this->customerDataFactory = $customerDataFactory;
     $this->dataObjectHelper = $dataObjectHelper;
     parent::__construct($context, $data);
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:14,代碼來源:Carts.php

示例2: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Framework\Stdlib\DateTime $dateTime
  * @param \Magento\Framework\Registry $registry
  * @param DataObjectHelper $dataObjectHelper
  * @param \Magento\Framework\ObjectManagerInterface $objectManager
  * @param array $data
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Framework\Registry $registry, DataObjectHelper $dataObjectHelper, \Magento\Framework\ObjectManagerInterface $objectManager, array $data = [])
 {
     parent::__construct($context, $data);
     $this->coreRegistry = $registry;
     $this->dateTime = $dateTime;
     $this->objectManager = $objectManager;
 }
開發者ID:shockwavemk,項目名稱:magento2-module-cron-schedule,代碼行數:16,代碼來源:Left.php

示例3: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param ConfigInterface $securityConfig
  * @param \Magento\Security\Model\AdminSessionsManager $sessionsManager
  * @param RemoteAddress $remoteAddress
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, ConfigInterface $securityConfig, \Magento\Security\Model\AdminSessionsManager $sessionsManager, RemoteAddress $remoteAddress)
 {
     parent::__construct($context);
     $this->securityConfig = $securityConfig;
     $this->sessionsManager = $sessionsManager;
     $this->remoteAddress = $remoteAddress;
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:13,代碼來源:Activity.php

示例4: __construct

 /**
  * Block constructor.
  *
  * @param \Magento\Backend\Block\Template\Context          $context        Templating context.
  * @param \Magento\Framework\Data\Form\Element\Factory     $elementFactory Form element factory.
  * @param \Magento\Rule\Block\Conditions                   $conditions     Rule conditions block.
  * @param \Smile\ElasticsuiteCatalogRule\Model\RuleFactory $ruleFactory    Search rule factory.
  * @param array                                            $data           Additional data.
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Data\Form\Element\Factory $elementFactory, \Magento\Rule\Block\Conditions $conditions, \Smile\ElasticsuiteCatalogRule\Model\RuleFactory $ruleFactory, array $data = [])
 {
     $this->elementFactory = $elementFactory;
     $this->conditions = $conditions;
     $this->rule = $ruleFactory->create();
     parent::__construct($context, $data);
 }
開發者ID:smile-sa,項目名稱:elasticsuite,代碼行數:16,代碼來源:Conditions.php

示例5: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context   $context
  * @param \Wyomind\SimpleGoogleShopping\Model\Feeds $sgsModel
  * @param \Wyomind\SimpleGoogleShopping\Helper\Data $sgsHelper
  * @param array                                     $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Wyomind\SimpleGoogleShopping\Model\Feeds $sgsModel, \Wyomind\SimpleGoogleShopping\Helper\Data $sgsHelper, \Wyomind\Core\Helper\Data $coreHelper, array $data = [])
 {
     $this->_sgsModel = $sgsModel;
     $this->_sgsHelper = $sgsHelper;
     $this->_coreHelper = $coreHelper;
     parent::__construct($context, $data);
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:13,代碼來源:Report.php

示例6: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Store\Model\Resource\Website\Collection $websiteCollection
  * @param \Magento\Theme\Model\Config\Customization $customizationConfig
  * @param \Magento\Framework\Json\Helper\Data $jsonHelper
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Store\Model\Resource\Website\Collection $websiteCollection, \Magento\Theme\Model\Config\Customization $customizationConfig, \Magento\Framework\Json\Helper\Data $jsonHelper, array $data = [])
 {
     $this->jsonHelper = $jsonHelper;
     $this->_websiteCollection = $websiteCollection;
     $this->_customizationConfig = $customizationConfig;
     parent::__construct($context, $data);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:14,代碼來源:StoreView.php

示例7: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Framework\Locale\ListsInterface $localeLists
  * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
  * @param \Magento\Core\Helper\Url $urlHelper
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Locale\ListsInterface $localeLists, \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Core\Helper\Url $urlHelper, array $data = array())
 {
     $this->_localeLists = $localeLists;
     $this->_localeResolver = $localeResolver;
     $this->_urlHelper = $urlHelper;
     parent::__construct($context, $data);
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:14,代碼來源:Locale.php

示例8: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $defaultColumnRenderer
  * @param TaxHelper $taxHelper
  * @param ItemPriceRenderer $itemPriceRenderer
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $defaultColumnRenderer, TaxHelper $taxHelper, ItemPriceRenderer $itemPriceRenderer, array $data = array())
 {
     $this->defaultColumnRenderer = $defaultColumnRenderer;
     $this->itemPriceRenderer = $itemPriceRenderer;
     $this->itemPriceRenderer->setZone('sales');
     parent::__construct($context, $data);
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:14,代碼來源:Renderer.php

示例9: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Framework\App\ProductMetadataInterface $productMetaData
  * @param \Magento\Framework\Module\ModuleList\Loader $loader
  * @param \Ebizmarts\Mandrill\Helper\Data $mandrillHelper
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\App\ProductMetadataInterface $productMetaData, \Magento\Framework\Module\ModuleList\Loader $loader, \Ebizmarts\Mandrill\Helper\Data $mandrillHelper, array $data = [])
 {
     parent::__construct($context, $data);
     $this->_metaData = $productMetaData;
     $this->_loader = $loader;
     $this->_mandrillHelper = $mandrillHelper;
 }
開發者ID:ebizmarts,項目名稱:magento2-autoresponder,代碼行數:14,代碼來源:Hint.php

示例10: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Store\Model\WebsiteFactory $websiteFactory
  * @param \Magento\Store\Model\GroupFactory $storeGroupFactory
  * @param \Magento\Store\Model\StoreFactory $storeFactory
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Store\Model\WebsiteFactory $websiteFactory, \Magento\Store\Model\GroupFactory $storeGroupFactory, \Magento\Store\Model\StoreFactory $storeFactory, array $data = [])
 {
     parent::__construct($context, $data);
     $this->_websiteFactory = $websiteFactory;
     $this->_storeGroupFactory = $storeGroupFactory;
     $this->_storeFactory = $storeFactory;
 }
開發者ID:koliaGI,項目名稱:magento2,代碼行數:14,代碼來源:Switcher.php

示例11: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry
  * @param \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration
  * @param \Magento\Framework\Registry $registry
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry, \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration, \Magento\Framework\Registry $registry, array $data = [])
 {
     $this->stockRegistry = $stockRegistry;
     $this->stockConfiguration = $stockConfiguration;
     $this->_coreRegistry = $registry;
     parent::__construct($context, $data);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:14,代碼來源:AbstractItems.php

示例12: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory
  * @param \Magento\Framework\Validator\UniversalFactory $universalFactory
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory, \Magento\Framework\Validator\UniversalFactory $universalFactory, array $data = [])
 {
     parent::__construct($context, $data);
     $this->_registry = $registry;
     $this->_attrOptionCollectionFactory = $attrOptionCollectionFactory;
     $this->_universalFactory = $universalFactory;
 }
開發者ID:nja78,項目名稱:magento2,代碼行數:14,代碼來源:Options.php

示例13: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Review\Model\ResourceModel\Rating\Option\Vote\CollectionFactory $votesFactory
  * @param \Magento\Review\Model\RatingFactory $ratingFactory
  * @param \Magento\Framework\Registry $registry
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Review\Model\ResourceModel\Rating\Option\Vote\CollectionFactory $votesFactory, \Magento\Review\Model\RatingFactory $ratingFactory, \Magento\Framework\Registry $registry, array $data = [])
 {
     $this->_votesFactory = $votesFactory;
     $this->_ratingFactory = $ratingFactory;
     $this->_coreRegistry = $registry;
     parent::__construct($context, $data);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:14,代碼來源:Summary.php

示例14: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Backend\Model\Auth\Session $authSession
  * @param \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Critical $criticalCollection
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Backend\Model\Auth\Session $authSession, \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Critical $criticalCollection, array $data = [])
 {
     parent::__construct($context, $data);
     $this->_authSession = $authSession;
     $this->_criticalCollection = $criticalCollection;
     $this->_isScopePrivate = true;
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:13,代碼來源:Window.php

示例15: __construct

 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Sales\Helper\Data $salesData
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Sales\Helper\Admin $adminHelper
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Sales\Helper\Data $salesData, \Magento\Framework\Registry $registry, \Magento\Sales\Helper\Admin $adminHelper, array $data = [])
 {
     $this->_coreRegistry = $registry;
     $this->_salesData = $salesData;
     parent::__construct($context, $data);
     $this->adminHelper = $adminHelper;
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:14,代碼來源:History.php


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