Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
15 | class NewsRepository extends AbstractRepository implements LimitedAccessSubQuery |
||
16 | { |
||
17 | /** |
||
18 | * Returns pure SQL to get ID of all objects that are accessible to given user. |
||
19 | * |
||
20 | * A user can access a news if at least one of the following conditions is true: |
||
21 | * |
||
22 | * - he is administrator |
||
23 | * - the news is active |
||
24 | * |
||
25 | * @param null|User $user |
||
26 | */ |
||
27 | public function getAccessibleSubQuery(?\Ecodev\Felix\Model\User $user): string |
||
34 | } |
||
35 | |||
36 | public function getIds(): array |
||
50 |