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