Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Base.php
1<?php
10
12
13abstract class Base
14{
18 abstract public function getPermissions(): array;
19
20 public function getMap(): array
21 {
22 $result = [];
23 foreach ($this->getPermissions() as $permissionId)
24 {
25 foreach ($this->getPermissionValue($permissionId) as $value)
26 {
27 $result[] = [
28 'permissionId' => $permissionId,
29 'value' => $value
30 ];
31 }
32 }
33
34 return $result;
35 }
36
37 protected function getPermissionValue($permissionId): array
38 {
39 return [PermissionDictionary::getDefaultPermissionValue($permissionId)];
40 }
41}