-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcontroller.php
More file actions
38 lines (29 loc) · 958 Bytes
/
controller.php
File metadata and controls
38 lines (29 loc) · 958 Bytes
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
<?php
/**
* Created by Pure/Web
* www.pure-web.ru
* © 2017
*/
namespace Concrete\Package\PureAccordion;
use Concrete\Core\Package\Package as PackageInstaller;
use Concrete\Core\Block\BlockType\BlockType;
defined('C5_EXECUTE') or die("Access Denied.");
class Controller extends PackageInstaller {
protected $pkgHandle = 'pure_accordion';
protected $appVersionRequired = '8.1.0';
protected $pkgVersion = '0.9.2';
public function getPackageName() {
return t("Pure Accordion");
}
public function getPackageDescription() {
return t("Pure Accordion a simple accordion with permalinks.");
}
public function install() {
/** @var $pkg \Concrete\Core\Entity\Package() */
$pkg = parent::install(); //parent is \Concrete\Core\Package\Package
$blockType = BlockType::getByHandle($this->pkgHandle);
if (!is_object($blockType)) {
BlockType::installBlockType($this->pkgHandle, $pkg);
}
}
}