| Conditions | 2 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public static function get_list(): array |
||
| 10 | { |
||
| 11 | $mapFn = function ($groups = []) { |
||
| 12 | $map = []; |
||
| 13 | foreach ($groups as $group) { |
||
| 14 | // Listboxfield values are escaped, use ASCII char instead of » |
||
| 15 | $map[$group->ID] = $group->getBreadcrumbs(' > '); |
||
| 16 | } |
||
| 17 | |||
| 18 | asort($map); |
||
| 19 | |||
| 20 | return $map; |
||
| 21 | }; |
||
| 22 | |||
| 23 | return $mapFn(Permission::get_groups_by_permission(['SITETREE_VIEW_ALL', 'ADMIN'])); |
||
| 24 | } |
||
| 26 |