-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEditor.php
executable file
·46 lines (43 loc) · 1.39 KB
/
Editor.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
<?php
/**
* Arikaim
*
* @link http://www.arikaim.com
* @copyright Copyright (c) Konstantin Atanasov <[email protected]>
* @license http://www.arikaim.com/license
*
*/
namespace Arikaim\Extensions\Editor;
use Arikaim\Core\Extension\Extension;
/**
* Template editor extension
*/
class Editor extends Extension
{
/**
* Install extension routes, events, jobs ..
*
* @return void
*/
public function install()
{
// Control Panel
$this->addApiRoute('PUT','/api/admin/editor/load/component/file','EditorControlPanel','loadComponentFile','session');
$this->addApiRoute('PUT','/api/admin/editor/save/component/file','EditorControlPanel','saveComponentFile','session');
$this->addApiRoute('PUT','/api/admin/editor/save/pages/metatags','PagesControlPanel','saveMetatags','session');
// Files
$this->addApiRoute('GET','/api/admin/editor/file/load/{theme}/{name}/{type}','FilesControlPanel','loadFile','session');
$this->addApiRoute('PUT','/api/admin/editor/file/save','FilesControlPanel','saveFile','session');
// Options
$this->createOption('editor.mode',false);
$this->createOption('editor.current.theme',null);
}
/**
* UnInstall
*
* @return void
*/
public function unInstall()
{
}
}