Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Link.php
Go to the documentation of this file.
1 <?php
7 
15 {
19  protected $_template = 'Magento_Review::rss/grid/link.phtml';
20 
24  protected $rssUrlBuilder;
25 
31  public function __construct(
32  \Magento\Framework\View\Element\Template\Context $context,
33  \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder,
34  array $data = []
35  ) {
36  $this->rssUrlBuilder = $rssUrlBuilder;
37  parent::__construct($context, $data);
38  }
39 
43  protected function _construct()
44  {
45  $this->setId('grid.rss.link');
46  parent::_construct();
47  }
48 
52  public function getLink()
53  {
54  return $this->rssUrlBuilder->getUrl($this->getLinkParams());
55  }
56 
60  public function getLabel()
61  {
62  return __('Pending Reviews RSS');
63  }
64 
70  public function isRssAllowed()
71  {
72  return true;
73  }
74 
78  protected function getLinkParams()
79  {
80  return ['type' => 'review'];
81  }
82 }
__()
Definition: __.php:13