src/Transfer/EzPlatform/Repository/Manager/UserGroupManager.php 1 location
|
@@ 198-212 (lines=15) @@
|
| 195 |
|
/** |
| 196 |
|
* {@inheritdoc} |
| 197 |
|
*/ |
| 198 |
|
public function remove(ObjectInterface $object) |
| 199 |
|
{ |
| 200 |
|
if (!$object instanceof UserGroupObject) { |
| 201 |
|
throw new UnsupportedObjectOperationException(UserGroupObject::class, get_class($object)); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
try { |
| 205 |
|
$userGroup = $this->find($object); |
| 206 |
|
$this->userService->deleteUserGroup($userGroup); |
| 207 |
|
|
| 208 |
|
return true; |
| 209 |
|
} catch (NotFoundException $notFound) { |
| 210 |
|
return false; |
| 211 |
|
} |
| 212 |
|
} |
| 213 |
|
} |
| 214 |
|
|
src/Transfer/EzPlatform/Repository/Manager/ContentTypeManager.php 1 location
|
@@ 262-276 (lines=15) @@
|
| 259 |
|
/** |
| 260 |
|
* {@inheritdoc} |
| 261 |
|
*/ |
| 262 |
|
public function remove(ObjectInterface $object) |
| 263 |
|
{ |
| 264 |
|
if (!$object instanceof ContentTypeObject) { |
| 265 |
|
throw new UnsupportedObjectOperationException(ContentTypeObject::class, get_class($object)); |
| 266 |
|
} |
| 267 |
|
|
| 268 |
|
try { |
| 269 |
|
$contentType = $this->find($object); |
| 270 |
|
$this->contentTypeService->deleteContentType($contentType); |
| 271 |
|
|
| 272 |
|
return true; |
| 273 |
|
} catch (NotFoundException $notFound) { |
| 274 |
|
return false; |
| 275 |
|
} |
| 276 |
|
} |
| 277 |
|
|
| 278 |
|
/** |
| 279 |
|
* @param FieldDefinitionObject $field |
src/Transfer/EzPlatform/Repository/Manager/ContentManager.php 1 location
|
@@ 202-216 (lines=15) @@
|
| 199 |
|
/** |
| 200 |
|
* {@inheritdoc} |
| 201 |
|
*/ |
| 202 |
|
public function remove(ObjectInterface $object) |
| 203 |
|
{ |
| 204 |
|
if (!$object instanceof ContentObject) { |
| 205 |
|
throw new UnsupportedObjectOperationException(ContentObject::class, get_class($object)); |
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
try { |
| 209 |
|
$content = $this->find($object); |
| 210 |
|
$this->contentService->deleteContent($content->contentInfo); |
| 211 |
|
|
| 212 |
|
return true; |
| 213 |
|
} catch (NotFoundException $notFound) { |
| 214 |
|
return false; |
| 215 |
|
} |
| 216 |
|
} |
| 217 |
|
|
| 218 |
|
/** |
| 219 |
|
* Assigns a main location ID for a content object. |