| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class FolderPermission implements \JsonSerializable |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var bool True if entity is readable |
||
| 23 | */ |
||
| 24 | protected $isReadable; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var bool True if entity is writable |
||
| 28 | */ |
||
| 29 | protected $isWritable; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param Folder $folder |
||
| 33 | */ |
||
| 34 | public function __construct(Folder $folder) |
||
| 35 | { |
||
| 36 | $this->isReadable = $folder->checkActionPermission('read'); |
||
| 37 | $this->isWritable = $folder->checkActionPermission('write'); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function jsonSerialize() |
||
| 45 | ]; |
||
| 46 | } |
||
| 48 |