Total Complexity | 9 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | class Overrides extends Views { |
||
6 | |||
7 | /** |
||
8 | * {@inheritdoc] |
||
9 | */ |
||
10 | public function init() { |
||
14 | } |
||
15 | |||
16 | function checkViewType($view) { |
||
|
|||
17 | $status = $view->type == t('Default') ? 1 : 0; |
||
18 | if (!$status) { |
||
19 | $name = empty($view->human_name) ? $view->name : $view->human_name; |
||
20 | $result = [ |
||
21 | module_exists('views_ui') |
||
22 | ? l($name, "admin/structure/views/view/{$view->name}/edit") |
||
23 | : $name, |
||
24 | $view->type |
||
25 | ]; |
||
26 | } |
||
27 | else { |
||
28 | $result = NULL; |
||
29 | } |
||
30 | $ret = [ |
||
31 | 'name' => $view->name, |
||
32 | 'status' => $status, |
||
33 | 'result' => $result, |
||
34 | ]; |
||
35 | return $ret; |
||
36 | } |
||
37 | |||
38 | function run() { |
||
59 | } |
||
60 | } |
||
61 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.