-
Notifications
You must be signed in to change notification settings - Fork 1
/
Stockroom.php
48 lines (42 loc) · 1005 Bytes
/
Stockroom.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
<?php
/**
* @package CMS\Stockroom
*/
class CMS_Stockroom implements Core_ModuleInterface
{
static $repositories = array(
'tao' => array(
'url' => 'http://cms.techart.ru/components/',
'title' => 'Текарт',
),
);
static $curl_options = array(
CURLOPT_TIMEOUT => 5,
);
static $disabled = false;
static $name = 'CMSStockroom';
static $admin_menu_title = 'Библиотека компонентов';
static $info_dir = '../app/components/.info';
static function initialize($config = array())
{
foreach ($config as $key => $value)
self::$$key = $value;
if (self::$disabled) {
return;
}
CMS::add_component(self::$name, new CMS_Stockroom_Router());
CMS_Admin::menu(self::$admin_menu_title, CMS::admin_path('stockroom'), 'bookshelf.png');
}
}
class CMS_Stockroom_Router extends CMS_Router
{
public function controllers()
{
return array(
'CMS.Controller.Stockroom' => array(
'path' => '{admin:stockroom}',
'table-admin' => true,
),
);
}
}