1 | <?php |
||
29 | trait UsersAttributeTrait |
||
30 | { |
||
31 | /** |
||
32 | * @var RelationshipInterface |
||
33 | */ |
||
34 | private $userManager; |
||
35 | |||
36 | /** |
||
37 | * @param array $sourceElements |
||
38 | * @return array |
||
39 | */ |
||
40 | private static function eagerLoadingUsersMap(array $sourceElements) |
||
56 | |||
57 | |||
58 | /************************************************************ |
||
59 | * REQUEST |
||
60 | ************************************************************/ |
||
61 | |||
62 | /** |
||
63 | * AssociateUserToOrganization an array of users from request input |
||
64 | * |
||
65 | * @param string $identifier |
||
66 | * @return $this |
||
67 | */ |
||
68 | public function setUsersFromRequest(string $identifier = 'users') |
||
76 | |||
77 | |||
78 | /************************************************************ |
||
79 | * USERS |
||
80 | ************************************************************/ |
||
81 | |||
82 | /** |
||
83 | * Get an array of users associated to an organization |
||
84 | * |
||
85 | * @return UserRelationship|RelationshipInterface |
||
86 | */ |
||
87 | public function getUsers(): RelationshipInterface |
||
95 | |||
96 | /** |
||
97 | * Set an array or query of users to an organization |
||
98 | * |
||
99 | * @param $users |
||
100 | * @return $this |
||
101 | */ |
||
102 | public function setUsers($users) |
||
107 | } |
||
108 |