Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 58 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. use MagentoCatalogBlockProductAbstractProduct;
  2.     use MagentoCatalogBlockProductContext;
  3.     use MagentoCatalogModelProductVisibility;
  4.     use MagentoFrameworkDataObjectIdentityInterface;
  5.     use MagentoFrameworkModuleManager as ModuleManager;
  6.     use MagentoFrameworkRegistry;
  7.     use FaonniProductMostOrderedModelResourceModelProductCollectionFactory;
  8.  
  9.     /**
  10.        * Product Most Ordered Block
  11.       */
  12.        class ProductList extends AbstractProduct implements  IdentityInterface
  13.      {
  14.         /**
  15.           * Core Registry
  16.           *
  17.           * @var MagentoFrameworkRegistry
  18.          */
  19.         protected $_coreRegistry;
  20.  
  21. /**
  22.  * Product Collection
  23.  *
  24.  * @var MagentoCatalogModelResourceModelProductCollection
  25.  */
  26. protected $_itemCollection;
  27.  
  28. /**
  29.  * Catalog Product Visibility
  30.  *
  31.  * @var MagentoCatalogModelProductVisibility
  32.  */
  33. protected $_catalogProductVisibility;
  34.  
  35. /**
  36.  * Module Manager
  37.  *
  38.  * @var MagentoFrameworkModuleManager
  39.  */
  40. protected $moduleManager;
  41.  
  42. /**
  43.  * Reports Product Collection Factory
  44.  *
  45.  * @var FaonniProductMostOrderedModelResourceModelProductCollectionFactory
  46.  */
  47. protected $_productsFactory;    
  48.  
  49. /**
  50.  * Initialize Block
  51.  *
  52.  * @param Context $context
  53.  * @param Visibility $catalogProductVisibility
  54.  * @param ModuleManager $moduleManager
  55.  * @param Registry $registry
  56.  * @param CollectionFactory $productsFactory
  57.  * @param array $data
  58.  */
  59. public function __construct(
  60.     Context $context,
  61.     Visibility $catalogProductVisibility,
  62.     ModuleManager $moduleManager,
  63.     Registry $registry,
  64.     CollectionFactory $productsFactory,
  65.     array $data = []
  66. ) {
  67.     $this->_catalogProductVisibility = $catalogProductVisibility;
  68.     $this->moduleManager = $moduleManager;
  69.     $this->_coreRegistry = $registry;
  70.     $this->_productsFactory = $productsFactory;
  71.  
  72.     parent::__construct(
  73.         $context,
  74.         $data
  75.     );
  76. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top