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


PHP AbstractProduct::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Related products block construct
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
  * @param \Magento\Framework\Module\Manager $moduleManager
  * @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Framework\Module\Manager $moduleManager, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, array $data = [])
 {
     $this->_catalogProductVisibility = $catalogProductVisibility;
     $this->_moduleManager = $moduleManager;
     $this->_productCollectionFactory = $productCollectionFactory;
     parent::__construct($context, $data);
 }
开发者ID:SilvanLaroo,项目名称:Blog-Extension-for-Magento-2,代码行数:14,代码来源:RelatedProducts.php

示例2: __construct

 public function __construct(AttributeFactory $attributeFactory, LoggerInterface $loggerInterface, DateTime $dateTime, Context $context, array $data)
 {
     $this->_attributeFactory = $attributeFactory;
     $this->_date = $dateTime;
     $this->_logger = $loggerInterface;
     parent::__construct($context, $data);
 }
开发者ID:dragonsword007008,项目名称:magento2,代码行数:7,代码来源:View.php

示例3: __construct

 /**
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param \Magento\Catalog\Model\ProductFactory $productFactory
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Framework\App\Http\Context $httpContext, \Magento\Catalog\Model\ProductFactory $productFactory, array $data = array())
 {
     $this->httpContext = $httpContext;
     $this->_productFactory = $productFactory;
     parent::__construct($context, $data);
     $this->_isScopePrivate = true;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:13,代码来源:AbstractBlock.php

示例4: __construct

 /**
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param \Magento\Review\Model\Rating\Option\VoteFactory $voteFactory
  * @param \Magento\Review\Model\RatingFactory $ratingFactory
  * @param \Magento\Review\Model\ReviewFactory $reviewFactory
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Review\Model\Rating\Option\VoteFactory $voteFactory, \Magento\Review\Model\RatingFactory $ratingFactory, \Magento\Review\Model\ReviewFactory $reviewFactory, array $data = [])
 {
     $this->_voteFactory = $voteFactory;
     $this->_reviewFactory = $reviewFactory;
     $this->_ratingFactory = $ratingFactory;
     parent::__construct($context, $data);
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:14,代码来源:View.php

示例5: __construct

 /**
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Framework\App\Http\Context $httpContext, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, array $data = [])
 {
     $this->httpContext = $httpContext;
     $this->productRepository = $productRepository;
     parent::__construct($context, $data);
     $this->_isScopePrivate = true;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:13,代码来源:AbstractBlock.php

示例6: __construct

 /**
  * @param Context $context
  * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Framework\App\Http\Context $httpContext, array $data = [])
 {
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->_catalogProductVisibility = $catalogProductVisibility;
     $this->httpContext = $httpContext;
     parent::__construct($context, $data);
 }
开发者ID:nja78,项目名称:magento2,代码行数:14,代码来源:NewProduct.php

示例7: __construct

 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, array $data = [])
 {
     $this->_storeManager = $storeManager;
     $this->checkoutSession = $checkoutSession;
     $this->customerSession = $customerSession;
     parent::__construct($context, $data);
 }
开发者ID:shakhawat4g,项目名称:MagentoExtensions,代码行数:7,代码来源:Facebookconversion.php

示例8: __construct

 /**
  * @param Context $context
  * @param \Magento\Customer\Model\Session $customerSession
  * @param \Magento\Customer\Helper\View $customerView
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Helper\View $customerView, array $data = array())
 {
     $this->_customerSession = $customerSession;
     $this->_customerView = $customerView;
     parent::__construct($context, $data);
     $this->_isScopePrivate = true;
 }
开发者ID:pavelnovitsky,项目名称:magento2,代码行数:13,代码来源:Send.php

示例9: __construct

 /**
  * @param Context $context
  * @param \Magento\Core\Helper\PostData $postDataHelper
  * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
  * @param \Magento\Catalog\Model\Layer $catalogLayer
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Core\Helper\PostData $postDataHelper, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\Layer $catalogLayer, array $data = array())
 {
     $this->_categoryFactory = $categoryFactory;
     $this->_catalogLayer = $catalogLayer;
     $this->_postDataHelper = $postDataHelper;
     parent::__construct($context, $data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:14,代码来源:ListProduct.php

示例10: __construct

 /**
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param \Magento\Checkout\Model\Resource\Cart $checkoutCart
  * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
  * @param \Magento\Checkout\Model\Session $checkoutSession
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Checkout\Model\Resource\Cart $checkoutCart, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Checkout\Model\Session $checkoutSession, array $data = array())
 {
     $this->_checkoutCart = $checkoutCart;
     $this->_catalogProductVisibility = $catalogProductVisibility;
     $this->_checkoutSession = $checkoutSession;
     parent::__construct($context, $data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:14,代码来源:Related.php

示例11: __construct

 /**
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
  * @param \Magento\Reports\Model\Product\Index\Factory $indexFactory
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Reports\Model\Product\Index\Factory $indexFactory, array $data = [])
 {
     parent::__construct($context, $data);
     $this->_productVisibility = $productVisibility;
     $this->_indexFactory = $indexFactory;
     $this->_isScopePrivate = true;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:13,代码来源:AbstractProduct.php

示例12: __construct

 /**
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param \Magento\Core\Helper\Data $coreData
  * @param \Magento\Customer\Service\V1\CustomerAccountServiceInterface $accountService
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Core\Helper\Data $coreData, \Magento\Customer\Service\V1\CustomerAccountServiceInterface $accountService, array $data = array())
 {
     $this->coreData = $coreData;
     $this->accountService = $accountService;
     parent::__construct($context, $data);
     $this->_isScopePrivate = true;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:13,代码来源:Links.php

示例13: __construct

 /**
  * Basket constructor.
  *
  * @param \Magento\Store\Model\App\EmulationFactory $emulationFactory
  * @param \Magento\Quote\Model\QuoteFactory         $quoteFactory
  * @param \Magento\Catalog\Block\Product\Context    $context
  * @param \Dotdigitalgroup\Email\Helper\Data        $helper
  * @param \Magento\Framework\Pricing\Helper\Data    $priceHelper
  * @param array                                     $data
  */
 public function __construct(\Magento\Store\Model\App\EmulationFactory $emulationFactory, \Magento\Quote\Model\QuoteFactory $quoteFactory, \Magento\Catalog\Block\Product\Context $context, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Framework\Pricing\Helper\Data $priceHelper, array $data = [])
 {
     $this->_quoteFactory = $quoteFactory;
     $this->helper = $helper;
     $this->priceHelper = $priceHelper;
     $this->_emulationFactory = $emulationFactory;
     parent::__construct($context, $data);
 }
开发者ID:dragonsword007008,项目名称:magento2,代码行数:18,代码来源:Basket.php

示例14: __construct

 /**
  * Wishlist constructor.
  *
  * @param \Magento\Wishlist\Model\WishlistFactory $wishlistFactory
  * @param \Magento\Customer\Model\CustomerFactory $customerFactory
  * @param \Magento\Catalog\Block\Product\Context  $context
  * @param \Dotdigitalgroup\Email\Helper\Data      $helper
  * @param \Magento\Framework\Pricing\Helper\Data  $priceHelper
  * @param array                                   $data
  */
 public function __construct(\Magento\Wishlist\Model\WishlistFactory $wishlistFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Catalog\Block\Product\Context $context, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Framework\Pricing\Helper\Data $priceHelper, array $data = [])
 {
     parent::__construct($context, $data);
     $this->wishlistFactory = $wishlistFactory;
     $this->customerFactory = $customerFactory;
     $this->helper = $helper;
     $this->priceHelper = $priceHelper;
 }
开发者ID:dotmailer,项目名称:dotmailer-magento2-extension,代码行数:18,代码来源:Wishlist.php

示例15: __construct

 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, Registry $registry, array $data = [])
 {
     $this->_coreRegistry = $registry;
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->_catalogConfig = $context->getCatalogConfig();
     $this->_catalogProductVisibility = $catalogProductVisibility;
     parent::__construct($context, $data);
 }
开发者ID:hientruongbluecom,项目名称:cemagento2,代码行数:8,代码来源:VendorView.php


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