-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcontroller.php
52 lines (42 loc) · 1.33 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
48
49
50
51
52
<?php
/**
* Nestable Manual Nav Add-on
* Manually choose pages, links, and files for your navigation menu
* For Concrete CMS
*
* @author Shahroq <shahroq \at\ yahoo.com>
* @copyright Copyright 2017-2022 Shahroq
* @link https://github.com/shahroq/whale_manual_nav
* @link https://marketplace.concretecms.com/marketplace/addons/nestable-manual-nav/
*/
namespace Concrete\Package\WhaleManualNav;
use Concrete\Core\Block\BlockType\BlockType;
use Concrete\Core\Package\Package;
defined('C5_EXECUTE') or die(_("Access Denied."));
class Controller extends Package
{
protected $pkgHandle = 'whale_manual_nav';
protected $appVersionRequired = '9.0.0';
protected $pkgVersion = '9.0.1';
public function getPackageName()
{
return t("Nestable Manual Nav");
}
public function getPackageDescription()
{
return t("Manually choose pages, links, and files for your navigation menu");
}
public function install()
{
$pkg = parent::install();
// install block
BlockType::installBlockType('whale_manual_nav', $pkg);
}
public function uninstall()
{
parent::uninstall();
$db = $this->app->make('database')->connection();
// drop tables
$db->executeQuery('DROP TABLE IF EXISTS `btWhaleManualNav`');
}
}