Split filter drawer contracts
This commit is contained in:
@@ -115,4 +115,13 @@ class PermissionRepository implements PermissionRepositoryInterface
|
||||
$result = DB::delete('delete from permissions where id = ?', (string) $id);
|
||||
return (bool) $result;
|
||||
}
|
||||
|
||||
public function listSystem(): array
|
||||
{
|
||||
$rows = DB::select(
|
||||
'select id, `key`, description, active, is_system, created from permissions where is_system = 1 order by `key` asc'
|
||||
);
|
||||
|
||||
return RepositoryArrayHelper::unwrapList($rows, 'permissions');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,7 @@ interface PermissionRepositoryInterface
|
||||
public function update(int $id, array $data): bool;
|
||||
|
||||
public function delete(int $id): bool;
|
||||
|
||||
/** @return list<array{id: int, key: string, description: string, active: int, is_system: int}> */
|
||||
public function listSystem(): array;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user