1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @package Skeleton module |
5
|
|
|
* @author Iurii Makukh <[email protected]> |
6
|
|
|
* @copyright Copyright (c) 2015, Iurii Makukh |
7
|
|
|
* @license https://www.gnu.org/licenses/gpl.html GNU/GPLv3 |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
namespace gplcart\modules\skeleton; |
11
|
|
|
|
12
|
|
|
use gplcart\core\Module; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Main class for Skeleton module |
16
|
|
|
*/ |
17
|
|
|
class Skeleton extends Module |
18
|
|
|
{ |
19
|
|
|
|
20
|
|
|
public function __construct() |
21
|
|
|
{ |
22
|
|
|
parent::__construct(); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Module info |
27
|
|
|
* @return array |
28
|
|
|
*/ |
29
|
|
|
public function info() |
30
|
|
|
{ |
31
|
|
|
return array( |
32
|
|
|
'name' => 'Skeleton', |
33
|
|
|
'version' => '1.0.0-alfa.2', |
34
|
|
|
'description' => 'A tool that allows developers to generate blank modules for different purposes', |
35
|
|
|
'author' => 'Iurii Makukh', |
36
|
|
|
'core' => '1.x' |
37
|
|
|
); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Implements hook "route.list" |
42
|
|
|
* @param array $routes |
43
|
|
|
*/ |
44
|
|
|
public function hookRouteList(array &$routes) |
45
|
|
|
{ |
46
|
|
|
$routes['admin/tool/skeleton'] = array( |
47
|
|
|
'menu' => array('admin' => 'Skeleton'), |
48
|
|
|
'handlers' => array( |
49
|
|
|
'controller' => array('gplcart\\modules\\skeleton\\controllers\\Skeleton', 'editSkeleton') |
50
|
|
|
) |
51
|
|
|
); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Implements hook "job.handlers" |
56
|
|
|
* @param array $handlers |
57
|
|
|
*/ |
58
|
|
|
public function hookJobHandlers(array &$handlers) |
59
|
|
|
{ |
60
|
|
|
$handlers['skeleton'] = array( |
61
|
|
|
'handlers' => array( |
62
|
|
|
'process' => array('gplcart\\modules\\skeleton\\handlers\\Extract', 'process') |
63
|
|
|
), |
64
|
|
|
); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* Implements hook "validator.handlers" |
69
|
|
|
* @param array $handlers |
70
|
|
|
*/ |
71
|
|
|
public function hookValidatorHandlers(array &$handlers) |
72
|
|
|
{ |
73
|
|
|
$handlers['skeleton'] = array( |
74
|
|
|
'handlers' => array( |
75
|
|
|
'validate' => array('gplcart\\modules\\skeleton\\handlers\\Validator', 'skeleton') |
76
|
|
|
), |
77
|
|
|
); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
} |
81
|
|
|
|