forked from MacareuxDigital/social_share_lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.php
38 lines (30 loc) · 1018 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
<?php
namespace Concrete\Package\SocialShareLite;
use Concrete\Core\Backup\ContentImporter;
use Concrete\Core\Block\BlockType\BlockType;
use Concrete\Core\Block\BlockType\Set as BlockTypeSet;
class Controller extends \Concrete\Core\Package\Package
{
protected $pkgHandle = 'social_share_lite';
protected $appVersionRequired = '5.7.2.1';
protected $pkgVersion = '2.1.4';
public function getPackageDescription()
{
return t("Add social sharing buttons");
}
public function getPackageName()
{
return t("Social Share Lite");
}
public function install()
{
$pkg = parent::install();
$ci = new ContentImporter();
$ci->importContentFile($pkg->getPackagePath() . '/config/install.xml');
$bt = BlockType::getByHandle('social_share_lite');
$btSet = BlockTypeSet::getByHandle('social');
if (is_object($bt) && is_object($btSet)) {
$btSet->addBlockType($bt);
}
}
}