-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.php
45 lines (36 loc) · 926 Bytes
/
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
<?php
/**
* @author shahroq <shahroq \at\ yahoo.com>
* @copyright Copyright (c) 2018 shahroq.
* http://concrete5.killerwhalesoft.com/addons/
*/
namespace Concrete\Package\WhaleOptions;
use Package;
use SinglePage;
defined('C5_EXECUTE') or die('Access denied.');
class Controller extends Package {
protected $pkgHandle = 'whale_options';
protected $appVersionRequired = '5.7.3';
protected $pkgVersion = '1.1.0';
public function getPackageDescription()
{
return t("Whale Options");
}
public function getPackageName()
{
return t("Whale Options");
}
public function install()
{
$pkg = parent::install();
$this->createSinglePage($pkg);
}
private function createSinglePage($pkg)
{
//options
$p = SinglePage::add('/dashboard/pages/options',$pkg);
if (is_object($p)) {
$p->update(array('cName'=>'Theme Options'));
}
}
}