forked from Mnkras/page_selector_attribute
/
controller.php
27 lines (21 loc) · 828 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
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
class PageSelectorAttributePackage extends Package {
protected $pkgHandle = 'page_selector_attribute';
protected $appVersionRequired = '5.4.0';
protected $pkgVersion = '1.1';
public function getPackageDescription() {
return t("Attribute that allows the selection of pages.");
}
public function getPackageName() {
return t("Page Selector Attribute");
}
public function install() {
$pkg = parent::install();
$pkgh = Package::getByHandle('page_selector_attribute');
Loader::model('attribute/categories/collection');
$col = AttributeKeyCategory::getByHandle('collection');
$pageselector = AttributeType::add('page_selector', t('Page Selector'), $pkgh);
$col->associateAttributeKeyType(AttributeType::getByHandle('page_selector'));
}
}