Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Page.php
Go to the documentation of this file.
1 <?php
7 
11 class Page extends \Magento\Backend\Block\Widget\Grid\Container
12 {
18  protected function _construct()
19  {
20  $this->_controller = 'adminhtml_page';
21  $this->_blockGroup = 'Magento_Cms';
22  $this->_headerText = __('Manage Pages');
23 
24  parent::_construct();
25 
26  if ($this->_isAllowedAction('Magento_Cms::save')) {
27  $this->buttonList->update('add', 'label', __('Add New Page'));
28  } else {
29  $this->buttonList->remove('add');
30  }
31  }
32 
39  protected function _isAllowedAction($resourceId)
40  {
41  return $this->_authorization->isAllowed($resourceId);
42  }
43 }
__()
Definition: __.php:13
_isAllowedAction($resourceId)
Definition: Page.php:39