Пример #1
0
 /**
  * Deletes $location and all its descendants.
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException If the current user is not allowed to delete this location or a descendant
  *
  * @param \eZ\Publish\API\Repository\Values\Content\Location $location
  */
 public function deleteLocation(Location $location)
 {
     $this->service->deleteLocation($location);
     $this->signalDispatcher->emit(new DeleteLocationSignal(array('contentId' => $location->contentId, 'locationId' => $location->id)));
 }
Пример #2
0
 /**
  * Deletes a location.
  *
  * @param string $locationPath
  *
  * @return \eZ\Publish\Core\REST\Server\Values\NoContent
  */
 public function deleteSubtree($locationPath)
 {
     $location = $this->locationService->loadLocation($this->extractLocationIdFromPath($locationPath));
     $this->locationService->deleteLocation($location);
     return new Values\NoContent();
 }