Implemented a nav link generating system so that extension power what shows up in the menus rather than being hard-coded in the themes.
This commit is contained in:
@ -108,6 +108,16 @@ class AdminPage extends Extension
|
||||
$this->theme->display_form();
|
||||
}
|
||||
|
||||
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
|
||||
{
|
||||
global $user;
|
||||
if($event->parent==="system") {
|
||||
if ($user->can(Permissions::MANAGE_ADMINTOOLS)) {
|
||||
$event->add_nav_link("admin", new Link('admin'), "Board Admin");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function onUserBlockBuilding(UserBlockBuildingEvent $event)
|
||||
{
|
||||
global $user;
|
||||
|
Reference in New Issue
Block a user