-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.php
47 lines (40 loc) · 1.24 KB
/
controller.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace Concrete\Package\AdvancedBlockMenu;
use Concrete\Core\Block\Menu\Manager;
use Concrete\Core\Package\Package;
use Concrete\Core\Routing\RouterInterface;
use Concrete\Core\Support\Facade\Route;
use Concrete5cojp\AdvancedBlockMenu\Block\Menu\AdvancedManager;
use Concrete5cojp\AdvancedBlockMenu\Routing\RouteList;
class Controller extends Package
{
protected $pkgHandle = 'advanced_block_menu';
protected $appVersionRequired = '8.5.0a2';
protected $pkgVersion = '0.1';
protected $pkgAutoloaderRegistries = [
'src/Concrete5cojp/AdvancedBlockMenu' => '\Concrete5cojp\AdvancedBlockMenu'
];
/**
* @inheritDoc
*/
public function getPackageName()
{
return t('Advanced Block Menu');
}
/**
* @inheritDoc
*/
public function getPackageDescription()
{
return t('Add "Information" menu item useful for developers in the block menu.');
}
public function on_start()
{
// Override Core Block Menu Manager
$this->app->bind(Manager::class, AdvancedManager::class);
/** @var RouterInterface $router */
$router = Route::getFacadeRoot();
// Add package routes by RouteList
$router->loadRouteList(new RouteList());
}
}