-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcontroller.php
52 lines (46 loc) · 1.17 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
<?php
namespace Concrete\Package\Amp;
use Concrete\Core\Backup\ContentImporter;
use PageTheme;
use Core;
class Controller extends \Concrete\Core\Package\Package
{
protected $pkgHandle = 'amp';
protected $appVersionRequired = '5.7.5.4';
protected $pkgVersion = '0.2';
protected $pkgAutoloaderMapCoreExtensions = true;
/**
* Returns the translated package name.
*
* @return string
*/
public function getPackageName()
{
return t('Accelerated Mobile Pages (AMP)');
}
/**
* Returns the translated package description.
*
* @return string
*/
public function getPackageDescription()
{
return t('Make your site ready for Accelerated Mobile Pages (AMP).');
}
/**
* Install process of the package.
*/
public function install()
{
$pkg = parent::install();
$ci = new ContentImporter();
$ci->importContentFile($pkg->getPackagePath() . '/config/install.xml');
}
/**
* Startup process of the package.
*/
public function on_start()
{
Core::bind('\PageController', 'Concrete\Package\Amp\Page\Controller\PageController');
}
}