| @@ 138-151 (lines=14) @@ | ||
| 135 | * |
|
| 136 | * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to create a user group |
|
| 137 | */ |
|
| 138 | public function deleteUserGroup(UserGroup $userGroup) |
|
| 139 | { |
|
| 140 | $returnValue = $this->service->deleteUserGroup($userGroup); |
|
| 141 | $this->signalDispatcher->emit( |
|
| 142 | new DeleteUserGroupSignal( |
|
| 143 | array( |
|
| 144 | 'userGroupId' => $userGroup->id, |
|
| 145 | 'affectedLocationIds' => $returnValue, |
|
| 146 | ) |
|
| 147 | ) |
|
| 148 | ); |
|
| 149 | ||
| 150 | return $returnValue; |
|
| 151 | } |
|
| 152 | ||
| 153 | /** |
|
| 154 | * Moves the user group to another parent. |
|
| @@ 161-174 (lines=14) @@ | ||
| 158 | * |
|
| 159 | * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to move the user group |
|
| 160 | */ |
|
| 161 | public function moveUserGroup(UserGroup $userGroup, UserGroup $newParent) |
|
| 162 | { |
|
| 163 | $returnValue = $this->service->moveUserGroup($userGroup, $newParent); |
|
| 164 | $this->signalDispatcher->emit( |
|
| 165 | new MoveUserGroupSignal( |
|
| 166 | array( |
|
| 167 | 'userGroupId' => $userGroup->id, |
|
| 168 | 'newParentId' => $newParent->id, |
|
| 169 | ) |
|
| 170 | ) |
|
| 171 | ); |
|
| 172 | ||
| 173 | return $returnValue; |
|
| 174 | } |
|
| 175 | ||
| 176 | /** |
|
| 177 | * Updates the group profile with fields and meta data. |
|