1 | <?php |
||
25 | class AuthorizedInstitutionCollection |
||
26 | { |
||
27 | /** |
||
28 | * The institution this collection represents |
||
29 | * @var Institution |
||
30 | */ |
||
31 | private $institution; |
||
32 | |||
33 | /** |
||
34 | * The related institutions |
||
35 | * @var Institution[] |
||
36 | */ |
||
37 | private $institutions = []; |
||
38 | |||
39 | /** |
||
40 | * Mapped on institution, a list of authorizations for the institution relation |
||
41 | * |
||
42 | * @example |
||
43 | * [ |
||
44 | * 'institution-1' => [use_ra, use_raa, select_raa], |
||
45 | * 'institution-2' => [use_ra], |
||
46 | * 'institution-3' => [select_raa], |
||
47 | * ] |
||
48 | * |
||
49 | * @var InstitutionRole[] |
||
50 | */ |
||
51 | private $authorizations = []; |
||
52 | |||
53 | public function __construct(Institution $institution) |
||
57 | |||
58 | /** |
||
59 | * @param Institution $institution |
||
60 | * @param InstitutionAuthorization[] $authorizations |
||
61 | * @return AuthorizedInstitutionCollection |
||
62 | */ |
||
63 | public static function fromInstitutionAuthorization(Institution $institution, $authorizations) |
||
74 | |||
75 | public function getInstitutions() |
||
79 | |||
80 | public function getAuthorizations() |
||
84 | } |
||
85 |