Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
45 | private function assembleActions() { |
||
46 | $actions = []; |
||
47 | foreach ($this->app->actions->getAllActions() as $id => $action) { |
||
48 | $actions[] = [ |
||
49 | 'caption' => $action->caption(), |
||
50 | 'description' => $this->app->parser->shorten($action->description()), |
||
51 | 'link' => ['href' => $id] |
||
52 | ]; |
||
53 | } |
||
54 | return $actions; |
||
55 | } |
||
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