Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function handleGet() { |
||
25 | $this->app->prepare(); |
||
26 | $this->crumbs->reset(); |
||
27 | |||
28 | global $model; |
||
|
|||
29 | $model = [ |
||
30 | 'name' => $this->app->name, |
||
31 | 'menu' => $this->app->menu->render(), |
||
32 | 'action' => $this->assembleActions(), |
||
33 | 'headElements' => [ |
||
34 | (string)HeadElements::jquery(), |
||
35 | (string)HeadElements::bootstrap(), |
||
36 | (string)HeadElements::bootstrapJs(), |
||
37 | ] |
||
38 | ]; |
||
39 | |||
40 | ob_start(); |
||
41 | include __DIR__ . '/ActionListTemplate.html.php'; |
||
42 | return ob_get_clean(); |
||
43 | } |
||
44 | |||
56 | } |
Instead of relying on
global
state, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state