| Total Complexity | 2 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 23 | class RolesController extends AdministrationBaseController |
||
| 24 | { |
||
| 25 | public const CACHE_KEY_ROLES = 'roles'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @inheritDoc |
||
| 29 | */ |
||
| 30 | protected $endpoint = '/roles'; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @inheritDoc |
||
| 34 | */ |
||
| 35 | protected $resourceType = 'roles'; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @inheritDoc |
||
| 39 | */ |
||
| 40 | protected $readonly = false; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @inheritDoc |
||
| 44 | */ |
||
| 45 | protected $properties = [ |
||
| 46 | 'name' => 'string', |
||
| 47 | 'description' => 'text', |
||
| 48 | ]; |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @inheritDoc |
||
| 52 | */ |
||
| 53 | public function save(): ?Response |
||
| 54 | { |
||
| 55 | Cache::delete(self::CACHE_KEY_ROLES); |
||
| 56 | |||
| 57 | return parent::save(); |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @inheritDoc |
||
| 62 | */ |
||
| 63 | public function remove(string $id): ?Response |
||
| 68 | } |
||
| 69 | } |
||
| 70 |