Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Rating.php
Go to the documentation of this file.
1 <?php
7 
11 
15 abstract class Rating extends Action
16 {
22  const ADMIN_RESOURCE = 'Magento_Review::ratings';
23 
29  protected $coreRegistry = null;
30 
35  public function __construct(
36  Context $context,
38  ) {
39  $this->coreRegistry = $coreRegistry;
40  parent::__construct($context);
41  }
42 
47  protected function initEnityId()
48  {
49  $this->initEntityId();
50  }
51 
55  protected function initEntityId()
56  {
57  $this->coreRegistry->register(
58  'entityId',
59  $this->_objectManager->create(\Magento\Review\Model\Rating\Entity::class)->getIdByCode('product')
60  );
61  }
62 }
__construct(Context $context, Registry $coreRegistry)
Definition: Rating.php:35