| Current Path : /var/www/www.indacotrentino.com/www/app/code/Ashsmith/Blog/Block/Adminhtml/ |
| Current File : //var/www/www.indacotrentino.com/www/app/code/Ashsmith/Blog/Block/Adminhtml/Post.php |
<?php
namespace Ashsmith\Blog\Block\Adminhtml;
class Post extends \Magento\Backend\Block\Widget\Grid\Container
{
protected function _construct()
{
$this->_controller = 'adminhtml_post';
$this->_blockGroup = 'Ashsmith_Blog';
$this->_headerText = __('Manage Entity Items');
parent::_construct();
if ($this->_isAllowedAction('Ashsmith_Blog::save')) {
$this->buttonList->update('add', 'label', __('Add New Item'));
} else {
$this->buttonList->remove('add');
}
}
protected function _isAllowedAction($resourceId)
{
return $this->_authorization->isAllowed($resourceId);
}
}