Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Tabs.php
Go to the documentation of this file.
1 <?php
7 
15 class Tabs extends \Magento\Backend\Block\Widget\Tabs
16 {
22  protected function _construct()
23  {
24  parent::_construct();
25  $this->setId('page_tabs');
26  $this->setDestElementId('edit_form');
27  $this->setTitle(__('User Information'));
28  }
29 
33  protected function _beforeToHtml()
34  {
35  $this->addTab(
36  'main_section',
37  [
38  'label' => __('User Info'),
39  'title' => __('User Info'),
40  'content' => $this->getLayout()->createBlock(\Magento\User\Block\User\Edit\Tab\Main::class)->toHtml(),
41  'active' => true
42  ]
43  );
44 
45  $this->addTab(
46  'roles_section',
47  [
48  'label' => __('User Role'),
49  'title' => __('User Role'),
50  'content' => $this->getLayout()->createBlock(
51  \Magento\User\Block\User\Edit\Tab\Roles::class,
52  'user.roles.grid'
53  )->toHtml()
54  ]
55  );
56  return parent::_beforeToHtml();
57  }
58 }
__()
Definition: __.php:13