Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Collection.php
Go to the documentation of this file.
1 <?php
7 
15 {
21  protected function _construct()
22  {
23  $this->_init(\Magento\User\Model\User::class, \Magento\User\Model\ResourceModel\User::class);
24  }
25 
31  protected function _initSelect()
32  {
33  parent::_initSelect();
34  $this->getSelect()->joinLeft(
35  ['user_role' => $this->getTable('authorization_role')],
36  'main_table.user_id = user_role.user_id AND user_role.parent_id != 0',
37  []
38  )->joinLeft(
39  ['detail_role' => $this->getTable('authorization_role')],
40  'user_role.parent_id = detail_role.role_id',
41  ['role_name']
42  );
43  }
44 }