Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | /** |
4 | * This file is part of the MADIS - RGPD Management application. |
5 | * |
6 | * @copyright Copyright (c) 2018-2019 Soluris - Solutions Numériques Territoriales Innovantes |
7 | * |
8 | * This program is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU Affero General Public License as published by |
10 | * the Free Software Foundation, either version 3 of the License, or |
11 | * (at your option) any later version. |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU Affero General Public License for more details. |
17 | * |
18 | * You should have received a copy of the GNU Affero General Public License |
19 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
20 | */ |
21 | |
22 | declare(strict_types=1); |
23 | |
24 | namespace App\Domain\User\Repository; |
25 | |
26 | use App\Application\DDD\Repository\CRUDRepositoryInterface; |
27 | use App\Application\Doctrine\Repository\DataTablesRepository; |
28 | use App\Domain\User\Model; |
29 | |
30 | interface Collectivity extends CRUDRepositoryInterface, DataTablesRepository |
31 | { |
32 | /** |
33 | * @return Model\Collectivity |
34 | */ |
35 | public function findOneById(string $id); |
36 | |
37 | /** |
38 | * Find collectivities thanks to an ids list. |
39 | * |
40 | * @param string[] $ids |
41 | * |
42 | * @return Model\Collectivity[] |
43 | */ |
44 | public function findByIds(array $ids): array; |
45 | |
46 | /** |
47 | * Find every collectivities which belong to one of the provided types. |
48 | * |
49 | * @return Model\Collectivity[] |
50 | */ |
51 | public function findByTypes(array $types, ?Model\Collectivity $excludedCollectivity = null): array; |
52 | |
53 | /** |
54 | * Find all collectivity. |
55 | * |
56 | * @param bool $active Get active / inactive activity |
57 | * @param array $order Order results |
58 | * |
59 | * @return Model\Collectivity[] The array of collectivity |
60 | */ |
61 | public function findAllActive(bool $active = true, array $order = []); |
62 | |
63 | /** |
64 | * Find all collectivity by. |
65 | */ |
66 | public function findByUserReferent(Model\User $userReferent, bool $active = true); |
67 | } |