-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.php
50 lines (42 loc) · 1.08 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
<?php
namespace Concrete\Package\SuitonIttBlock;
use Package;
use BlockType;
use Loader;
use Core;
use User;
use Page;
use UserInfo;
use Exception;
use Concrete\Core\Block\BlockController;
use Route;
use Router;
use Database;
defined('C5_EXECUTE') or die("Access Denied.");
class Controller extends Package
{
protected $pkgDescription = "Image + Title + RichText block";
protected $pkgName = "Suiton ITT Block";
protected $pkgHandle = 'suiton_itt_block';
protected $appVersionRequired = '5.7.3.1';
protected $pkgVersion = '1.0.0';
public function install()
{
// Run default install process
$pkg = parent::install();
$bt = BlockType::getByHandle('suiton_itt');
if (!is_object($bt)) {
$bt = BlockType::installBlockType('suiton_itt', $pkg);
}
}
public function upgrade()
{
$pkg = $this->getByID($this->getPackageID());
parent::upgrade();
}
public function uninstall() {
parent::uninstall();
$db = Loader::db();
//$db->Execute('DROP TABLE btFormSuitonForm');
}
}