forked from Remo/concrete5-attribute-forms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.php
More file actions
43 lines (34 loc) · 914 Bytes
/
controller.php
File metadata and controls
43 lines (34 loc) · 914 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
39
40
41
42
43
<?php
namespace Concrete\Package\AttributeForms;
use Concrete\Core\Backup\ContentImporter,
Package;
class Controller extends Package
{
protected $pkgHandle = 'attribute_forms';
protected $appVersionRequired = '5.7.4.2';
protected $pkgVersion = '0.9.8';
public function getPackageName()
{
return t('Attribute Form');
}
public function getPackageDescription()
{
return t('A package to create forms using attributes');
}
protected function installXmlContent()
{
$pkg = Package::getByHandle($this->pkgHandle);
$ci = new ContentImporter();
$ci->importContentFile($pkg->getPackagePath() . '/install.xml');
}
public function install()
{
parent::install();
$this->installXmlContent();
}
public function upgrade()
{
parent::upgrade();
$this->installXmlContent();
}
}