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