daily pastebin goal
79%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ...
  2. protected $productRepository;
  3. ...
  4. public function __construct(
  5.     ...
  6.     MagentoCatalogModelProductRepository $productRepository
  7.     ...
  8. ) {
  9.     ...
  10.     $this->productRepository = $productRepository;
  11.     ...
  12. }
  13.  
  14. public function loadMyProduct($sku)
  15. {
  16.     return $this->productRepository->get($sku);
  17. }
  18. ...
  19.    
  20. ...
  21. protected $productRepository;
  22. ...
  23. public function __construct(
  24.     ...
  25.     MagentoCatalogApiProductRepositoryInterface $productRepository
  26.     ...
  27. ) {
  28.     ...
  29.     $this->productRepository = $productRepository;
  30.     ...
  31. }
  32.  
  33. public function loadMyProduct($sku)
  34. {
  35.     return $this->productRepository->get($sku);
  36. }
  37. ...
RAW Paste Data
Top