• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Product\AbstractProduct类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __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


示例2: __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


示例3: __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


示例4: __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


示例5: __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


示例6: __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


示例7: __construct

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


示例8: __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


示例9: getProduct

 /**
  * Retrieve product
  *
  * @return \Magento\Catalog\Model\Product
  */
 public function getProduct()
 {
     $product = parent::getProduct();
     if ($product && $product->getTypeInstance()->getStoreFilter($product) === null) {
         $product->getTypeInstance()->setStoreFilter($this->_storeManager->getStore(), $product);
     }
     return $product;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:13,代码来源:AbstractView.php


示例10: __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


示例11: __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


示例12: getImage

 /**
  * {@inheritdoc}
  */
 public function getImage($product, $imageId, $attributes = array())
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getImage');
     if (!$pluginInfo) {
         return parent::getImage($product, $imageId, $attributes);
     } else {
         return $this->___callPlugins('getImage', func_get_args(), $pluginInfo);
     }
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:12,代码来源:Interceptor.php


示例13: __construct

 public function __construct(\Magento\Quote\Model\QuoteFactory $quoteFactory, \Magento\Catalog\Block\Product\Context $context, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Pricing\Helper\Data $priceHelper, \Magento\Framework\ObjectManagerInterface $objectManagerInterface, array $data = [])
 {
     $this->_quoteFactory = $quoteFactory;
     $this->helper = $helper;
     $this->priceHelper = $priceHelper;
     $this->scopeManager = $scopeConfig;
     $this->objectManager = $objectManagerInterface;
     parent::__construct($context, $data);
 }
开发者ID:ThomasNegeli,项目名称:dotmailer-magento2-extension,代码行数:9,代码来源:Basket.php


示例14: __construct

 /**
  * Order constructor.
  *
  * @param \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection
  * @param \Magento\Review\Model\ReviewFactory $reviewFactory
  * @param \Magento\Sales\Model\OrderFactory $orderFactory
  * @param \Dotdigitalgroup\Email\Helper\Data $helper
  * @param \Magento\Framework\Pricing\Helper\Data $priceHelper
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection, \Magento\Review\Model\ReviewFactory $reviewFactory, \Magento\Sales\Model\OrderFactory $orderFactory, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Framework\Pricing\Helper\Data $priceHelper, \Magento\Catalog\Block\Product\Context $context, array $data = [])
 {
     $this->productCollection = $productCollection;
     $this->reviewFactory = $reviewFactory;
     $this->orderFactory = $orderFactory;
     $this->helper = $helper;
     $this->priceHelper = $priceHelper;
     parent::__construct($context, $data);
 }
开发者ID:dotmailer,项目名称:dotmailer-magento2-extension,代码行数:20,代码来源:Review.php


示例15: __construct

 public function __construct(\Dotdigitalgroup\Email\Helper\Data $helper, \Dotdigitalgroup\Email\Helper\Recommended $recommendedHelper, \Magento\Framework\Pricing\Helper\Data $priceHelper, \Magento\Catalog\Block\Product\Context $context, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\ObjectManagerInterface $objectManagerInterface, array $data = [])
 {
     parent::__construct($context, $data);
     $this->helper = $helper;
     $this->_recommendedHelper = $recommendedHelper;
     $this->priceHelper = $priceHelper;
     $this->scopeManager = $scopeConfig;
     $this->storeManager = $this->_storeManager;
     $this->objectManager = $objectManagerInterface;
 }
开发者ID:ThomasNegeli,项目名称:dotmailer-magento2-extension,代码行数:10,代码来源:Quoteproducts.php


示例16: __construct

 /**
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param \Magento\Checkout\Model\Session $checkoutSession
  * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
  * @param \Magento\Catalog\Model\Product\LinkFactory $productLinkFactory
  * @param \Magento\Quote\Model\Quote\Item\RelatedProducts $itemRelationsList
  * @param StockHelper $stockHelper
  * @param array $data
  *
  * @codeCoverageIgnore
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Catalog\Model\Product\LinkFactory $productLinkFactory, \Magento\Quote\Model\Quote\Item\RelatedProducts $itemRelationsList, StockHelper $stockHelper, array $data = [])
 {
     $this->_checkoutSession = $checkoutSession;
     $this->_productVisibility = $productVisibility;
     $this->_productLinkFactory = $productLinkFactory;
     $this->_itemRelationsList = $itemRelationsList;
     $this->stockHelper = $stockHelper;
     parent::__construct($context, $data);
     $this->_isScopePrivate = true;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:22,代码来源:Crosssell.php


示例17: __construct

 /**
  * Recentlyviewed constructor.
  *
  * @param \Magento\Catalog\Model\ProductFactory $productFactory
  * @param \Magento\Customer\Model\SessionFactory $sessionFactory
  * @param \Dotdigitalgroup\Email\Helper\Data $helper
  * @param \Magento\Framework\Pricing\Helper\Data $priceHelper
  * @param \Dotdigitalgroup\Email\Helper\Recommended $recommended
  * @param \Magento\Catalog\Block\Product\Context $context
  * @param \Magento\Reports\Block\Product\Viewed $viewed
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Customer\Model\SessionFactory $sessionFactory, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Framework\Pricing\Helper\Data $priceHelper, \Dotdigitalgroup\Email\Helper\Recommended $recommended, \Magento\Catalog\Block\Product\Context $context, \Magento\Reports\Block\Product\Viewed $viewed, array $data = [])
 {
     parent::__construct($context, $data);
     $this->sessionFactory = $sessionFactory;
     $this->helper = $helper;
     $this->recommnededHelper = $recommended;
     $this->priceHelper = $priceHelper;
     $this->storeManager = $this->_storeManager;
     $this->productFactory = $productFactory;
     $this->viewed = $viewed;
 }
开发者ID:dotmailer,项目名称:dotmailer-magento2-extension,代码行数:23,代码来源:Recentlyviewed.php


示例18: __construct

 /**
  * Quoteproducts constructor.
  *
  * @param \Magento\Quote\Model\QuoteFactory         $quoteFactory
  * @param \Dotdigitalgroup\Email\Helper\Data        $helper
  * @param \Magento\Catalog\Model\ProductFactory     $productFactory
  * @param \Dotdigitalgroup\Email\Helper\Recommended $recommendedHelper
  * @param \Magento\Framework\Pricing\Helper\Data    $priceHelper
  * @param \Magento\Catalog\Block\Product\Context    $context
  * @param array                                     $data
  */
 public function __construct(\Magento\Quote\Model\QuoteFactory $quoteFactory, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Catalog\Model\ProductFactory $productFactory, \Dotdigitalgroup\Email\Helper\Recommended $recommendedHelper, \Magento\Framework\Pricing\Helper\Data $priceHelper, \Magento\Catalog\Block\Product\Context $context, array $data = [])
 {
     parent::__construct($context, $data);
     $this->helper = $helper;
     $this->_productFactory = $productFactory;
     $this->_quoteFactory = $quoteFactory;
     $this->_recommendedHelper = $recommendedHelper;
     $this->priceHelper = $priceHelper;
     //$this->scopeManager = $scopeConfig;
     $this->storeManager = $this->_storeManager;
 }
开发者ID:dragonsword007008,项目名称:magento2,代码行数:22,代码来源:Quoteproducts.php


示例19: __construct

 public function __construct(\Magento\Sales\Model\OrderFactory $orderFactory, \Dotdigitalgroup\Email\Model\Apiconnector\ClientFactory $clientFactory, \Magento\Catalog\Model\ProductFactory $productFactory, \Dotdigitalgroup\Email\Helper\Recommended $recommended, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Framework\Pricing\Helper\Data $priceHelper, \Magento\Catalog\Block\Product\Context $context, array $data = [])
 {
     parent::__construct($context, $data);
     $this->_orderFactory = $orderFactory;
     $this->_clientFactory = $clientFactory;
     $this->recommendedHelper = $recommended;
     $this->_productFactory = $productFactory;
     $this->helper = $helper;
     $this->priceHelper = $priceHelper;
     $this->storeManager = $this->_storeManager;
 }
开发者ID:dragonsword007008,项目名称:magento2,代码行数:11,代码来源:Product.php


示例20: __construct

 /**
  * Bestsellers constructor.
  *
  * @param \Dotdigitalgroup\Email\Helper\Data                                  $helper
  * @param \Magento\Framework\Pricing\Helper\Data                              $priceHelper
  * @param \Dotdigitalgroup\Email\Helper\Recommended                           $recommended
  * @param \Magento\Framework\Stdlib\DateTime\DateTime                         $dateTime
  * @param \Magento\Catalog\Model\CategoryFactory                              $categoryFactory
  * @param \Magento\Catalog\Block\Product\Context                              $context
  * @param \Magento\CatalogInventory\Model\StockFactory                        $stockFactory
  * @param \Magento\Reports\Model\ResourceModel\Product\Sold\CollectionFactory $productSoldFactory
  * @param array                                                               $data
  */
 public function __construct(\Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Framework\Pricing\Helper\Data $priceHelper, \Dotdigitalgroup\Email\Helper\Recommended $recommended, \Magento\Framework\Stdlib\DateTime\DateTime $dateTime, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Block\Product\Context $context, \Magento\CatalogInventory\Model\StockFactory $stockFactory, \Magento\Reports\Model\ResourceModel\Product\Sold\CollectionFactory $productSoldFactory, array $data = [])
 {
     $this->helper = $helper;
     $this->_dateTime = $dateTime;
     $this->priceHelper = $priceHelper;
     $this->_stockFactory = $stockFactory;
     $this->recommnededHelper = $recommended;
     $this->_categoryFactory = $categoryFactory;
     $this->_productSoldFactory = $productSoldFactory;
     $this->storeManager = $this->_storeManager;
     parent::__construct($context, $data);
 }
开发者ID:dragonsword007008,项目名称:magento2,代码行数:25,代码来源:Bestsellers.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Adminhtml\Product类代码示例发布时间:2022-05-23
下一篇:
PHP Data\ProductInterface类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap