FEATURE #1753: remove pingpong/modules and use custom solution

This commit is contained in:
Michal Kváček
2017-07-31 15:32:33 +02:00
parent f876a08429
commit 72c64dc6d1
48 changed files with 1230 additions and 1156 deletions
@@ -0,0 +1,38 @@
<?php
namespace Modules\$ModuleNamespace$\Handlers;
use App\CMS\Handlers\Handler;
use App\Models\User;
class $Module$Handler extends Handler
{
/**
* Register admin menu
*
* @param User $user
*/
public static function registerAdminMenu(User $user)
{
// register links in admin menu
$menu = \Menu::instance('mainMenu');
$menu->dropdown(trans('$module$::$module$.name'), function ($submenu) use ($user) {
$submenu->route('$module$.overview', trans('$module$::$module$.overview'), [], 20, ['icon' => 'fa fa-fw fa-list']);
$submenu->route('$module$.new', trans('$module$::$module$.new'), [], 21, ['icon' => 'fa fa-fw fa-plus']);
}, 15, ['icon' => 'fa fa-fw']);
// TODO: add admin menu entries
}
/**
* Does this module support categories?
* @return boolean
*/
public static function supportCategories()
{
return true;
}
}