-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontroller.php
43 lines (35 loc) · 1.01 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
<?php
namespace Concrete\Package\Join;
defined('C5_EXECUTE') or die(_("Access Denied."));
use \Concrete\Core\Package\Package;
use \Concrete\Core\Block\BlockType\BlockType;
use Concrete\Core\Support\Facade\Database;
class Controller extends Package
{
protected $pkgHandle = 'join';
protected $appVersionRequired = '8.5.4';
protected $pkgVersion = '1.0';
public function getPackageDescription()
{
return t('Adds a join block that registered users can use to signal their interest in joining.');
}
public function getPackageName()
{
return t('Join');
}
public function install()
{
$pkg = parent::install();
$bt = BlockType::getByHandle('join');
if (!is_object($bt)) {
$bt = BlockType::installBlockType('join', $pkg);
}
}
public function uninstall()
{
parent::uninstall();
$db = Database::connection();
$db->query('DROP TABLE btJoin');
$db->query('DROP TABLE btJoinUser');
}
}