| Conditions | 8 |
| Paths | 8 |
| Total Lines | 29 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | private function getAcl(ActionSchema $action) { |
||
| 31 | $input = $this->getService()->getIOService()->getInput(); |
||
| 32 | $acls = []; |
||
| 33 | $acl = $input->getOption('acl'); |
||
| 34 | if ($acl !== null && count($acl) > 0) { |
||
| 35 | if (!is_array($acl)) { |
||
| 36 | $acl = [$acl]; |
||
| 37 | } |
||
| 38 | foreach ($acl as $group) { |
||
| 39 | if (strpos($group, ',') !== false) { |
||
| 40 | $groups = explode(',', $group); |
||
| 41 | foreach ($groups as $g) { |
||
| 42 | $acls[] = trim($g); |
||
| 43 | } |
||
| 44 | } else { |
||
| 45 | $acls[] = $group; |
||
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 49 | return $acls; |
||
| 50 | } |
||
| 51 | |||
| 52 | // read default from package |
||
| 53 | if (!$action->getAcl()->isEmpty()) { |
||
| 54 | return $action->getAcl()->toArray(); |
||
| 55 | } |
||
| 56 | |||
| 57 | return $acls; |
||
| 58 | } |
||
| 59 | } |