-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcontroller.php
More file actions
54 lines (44 loc) · 1.33 KB
/
controller.php
File metadata and controls
54 lines (44 loc) · 1.33 KB
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
51
52
53
54
<?php
namespace Concrete\Package\Fruitful;
use Package;
use BlockType;
use SinglePage;
use PageTheme;
use BlockTypeSet;
use CollectionAttributeKey;
use Concrete\Core\Attribute\Type as AttributeType;
defined('C5_EXECUTE') or die(_("Access Denied."));
class Controller extends Package
{
protected $pkgHandle = 'fruitful';
protected $appVersionRequired = '5.7.1';
protected $pkgVersion = '1.2';
public function getPackageDescription()
{
return t("May your business be Fruitful");
}
public function getPackageName()
{
return t("Fruitful");
}
public function install()
{
$pkg = parent::install();
BlockTypeSet::add("fruitful","Fruitful", $pkg);
BlockType::installBlockTypeFromPackage('simple_button_fruitful', $pkg);
BlockType::installBlockTypeFromPackage('hero_featurette_fruitful', $pkg);
BlockType::installBlockTypeFromPackage('intro_cta_fruitful', $pkg);
BlockType::installBlockTypeFromPackage('full_width_content_fruitful', $pkg);
PageTheme::add('fruitful', $pkg);
$imgAttr = AttributeType::getByHandle('image_file');
$thumb = CollectionAttributeKey::getByHandle('thumbnail');
if(!is_object($thumb)) {
CollectionAttributeKey::add($imgAttr,
array(
'akHandle' => 'thumbnail',
'akName' => t('Thumbnail Image'),
),$pkg);
}
}
}
?>