Skip to content

Instantly share code, notes, and snippets.

@vojtasvoboda
Created June 22, 2017 10:55
Show Gist options
  • Save vojtasvoboda/588c3b8983e9307d0f965d1fc2c06ae4 to your computer and use it in GitHub Desktop.
Save vojtasvoboda/588c3b8983e9307d0f965d1fc2c06ae4 to your computer and use it in GitHub Desktop.
RainLab.User sidemenu
<?php
class Plugin extends PluginBase
{
public function boot()
{
// Override backend menu
Event::listen('backend.menu.extendItems', function($manager) {
$icons['users'] = [
'label' => 'Uživatelé',
'url' => Backend::url('rainlab/user/users'),
'icon' => 'icon-user',
'permissions' => ['rainlab.users.access_users'],
'order' => 200,
];
$icons['usergroups'] = [
'label' => 'Skupiny',
'url' => Backend::url('rainlab/user/usergroups'),
'icon' => 'icon-group',
'permissions' => ['rainlab.users.access_groups'],
'order' => 300,
];
$manager->addSideMenuItems('RainLab.User', 'user', $icons);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment