1 | <?php |
||
18 | class Main |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * Module class instance |
||
23 | * @var \gplcart\core\Module $model |
||
24 | */ |
||
25 | protected $module; |
||
26 | |||
27 | /** |
||
28 | * @param Module $module |
||
29 | */ |
||
30 | public function __construct(Module $module) |
||
34 | |||
35 | /** |
||
36 | * Implements hook "route.list" |
||
37 | * @param array $routes |
||
38 | */ |
||
39 | public function hookRouteList(array &$routes) |
||
58 | |||
59 | /** |
||
60 | * Implements hook "user.role.permissions" |
||
61 | * @param array $permissions |
||
62 | */ |
||
63 | public function hookUserRolePermissions(array &$permissions) |
||
67 | |||
68 | /** |
||
69 | * Implements hook "dashboard.handlers" |
||
70 | * @param array $handlers |
||
71 | */ |
||
72 | public function hookDashboardHandlers(array &$handlers) |
||
105 | |||
106 | /** |
||
107 | * Implements hook "construct.controller.backend" |
||
108 | * @param \gplcart\core\controllers\backend\Controller $controller |
||
109 | */ |
||
110 | public function hookConstructControllerBackend($controller) |
||
119 | |||
120 | /** |
||
121 | * Returns an array of GA handlers |
||
122 | * @return array |
||
123 | */ |
||
124 | public function getHandlers() |
||
128 | |||
129 | /** |
||
130 | * Returns a single handler data |
||
131 | * @param string $handler_id |
||
132 | * @return array |
||
133 | */ |
||
134 | public function getHandler($handler_id) |
||
138 | |||
139 | /** |
||
140 | * Returns an array of Google Anylytics report |
||
141 | * @param array|string $handler Either an array of handler data or a handler ID |
||
142 | * @param array|null $settings An array of settings. If not provided, the module settings will be used |
||
143 | * @return array |
||
144 | */ |
||
145 | public function getReport($handler, $settings = null) |
||
157 | |||
158 | /** |
||
159 | * Returns the report model instance |
||
160 | * @return \gplcart\modules\ga_report\models\Report |
||
161 | */ |
||
162 | public function getModel() |
||
168 | |||
169 | } |
||
170 |