-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontroller.php
56 lines (45 loc) · 1.23 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace Concrete\Package\ThemeKiso;
use Package;
use BlockType;
use SinglePage;
use PageTheme;
use BlockTypeSet;
use Loader;
use FileImporter;
defined('C5_EXECUTE') or die(_("Access Denied."));
class Controller extends Package
{
protected $pkgHandle = 'theme_kiso';
protected $appVersionRequired = '5.7.3';
protected $pkgVersion = '1.0.0';
protected $pkgAllowsFullContentSwap = true;
public function getPackageDescription()
{
return t("考え中。");
}
public function getPackageName()
{
return t("Kiso");
}
public function import_files()
{
// now we add in any files that this package has
if (is_dir($this->getPackagePath() . '/content_files'))
{
$fh = new FileImporter();
$contents = Loader::helper('file')->getDirectoryContents($this->getPackagePath() . '/content_files');
foreach ($contents as $filename)
{
$f = $fh->import($this->getPackagePath() . '/content_files/' . $filename, $filename);
}
}
}
public function install()
{
$pkg = parent::install();
BlockTypeSet::add("theme_kiso","Kiso", $pkg);
PageTheme::add('kiso', $pkg);
}
}
?>