Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
User.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\User\Block;
7 
15 class User extends \Magento\Backend\Block\Widget\Grid\Container
16 {
20  protected $_resourceModel;
21 
27  public function __construct(
28  \Magento\Backend\Block\Widget\Context $context,
30  array $data = []
31  ) {
32  parent::__construct($context, $data);
33  $this->_resourceModel = $resourceModel;
34  }
35 
41  protected function _construct()
42  {
43  $this->addData(
44  [
45  \Magento\Backend\Block\Widget\Container::PARAM_CONTROLLER => 'user',
46  \Magento\Backend\Block\Widget\Grid\Container::PARAM_BLOCK_GROUP => 'Magento_User',
47  \Magento\Backend\Block\Widget\Grid\Container::PARAM_BUTTON_NEW => __('Add New User'),
48  \Magento\Backend\Block\Widget\Container::PARAM_HEADER_TEXT => __('Users'),
49  ]
50  );
51  parent::_construct();
52  $this->_addNewButton();
53  }
54 }
__construct(\Magento\Backend\Block\Widget\Context $context, \Magento\User\Model\ResourceModel\User $resourceModel, array $data=[])
Definition: User.php:27
__()
Definition: __.php:13
$resourceModel
Definition: tablerates.php:10