Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | List of all members
eZ\Publish\API\Repository\LocationService Interface Reference
Inheritance diagram for eZ\Publish\API\Repository\LocationService:

## Public Member Functions
| copySubtree (Location $subtree, Location $targetParentLocation)
| Copies the subtree starting from $subtree as a new subtree of $targetLocation. More...
| loadLocation ($locationId, array $prioritizedLanguages=null, bool $useAlwaysAvailable=null)
| Loads a location object from its $locationId. More...
| loadLocationList (array $locationIds, array $prioritizedLanguages=null, bool $useAlwaysAvailable=null)
| Loads several location objects from its $locationIds. More...
| loadLocationByRemoteId ($remoteId, array $prioritizedLanguages=null, bool $useAlwaysAvailable=null)
| Loads a location object from its $remoteId. More...
| loadLocations (ContentInfo $contentInfo, Location $rootLocation=null, array $prioritizedLanguages=null)
| Loads the locations for the given content object. More...
| loadLocationChildren (Location $location, $offset=0, $limit=25, array $prioritizedLanguages=null)
| Loads children which are readable by the current user of a location object sorted by sortField and sortOrder. More...
| loadParentLocationsForDraftContent (VersionInfo $versionInfo, array $prioritizedLanguages=null)
| Load parent Locations for Content Draft. More...
| getLocationChildCount (Location $location)
| Returns the number of children which are readable by the current user of a location object. More...
| createLocation (ContentInfo $contentInfo, LocationCreateStruct $locationCreateStruct)
| Creates the new $location in the content repository for the given content. More...
| updateLocation (Location $location, LocationUpdateStruct $locationUpdateStruct)
| Updates $location in the content repository. More...
| swapLocation (Location $location1, Location $location2)
| Swaps the contents held by $location1 and $location2. More...
| hideLocation (Location $location)
| Hides the $location and marks invisible all descendants of $location. More...
| unhideLocation (Location $location)
| Unhides the $location. More...
| moveSubtree (Location $location, Location $newParentLocation)
| Moves the subtree to $newParentLocation. More...
| deleteLocation (Location $location)
| Deletes $location and all its descendants. More...
| newLocationCreateStruct ($parentLocationId)
| Instantiates a new location create class. More...
| newLocationUpdateStruct ()
| Instantiates a new location update class. More...
| getAllLocationsCount ()
| Get the total number of all existing Locations. More...
| loadAllLocations (int $offset=0, int $limit=25)
| Bulk-load all existing Locations, constrained by $limit and $offset to paginate results. More...

## Detailed Description

Definition at line 20 of file API/Repository/LocationService.php.

## Member Function Documentation

## ◆ copySubtree()

eZ\Publish\API\Repository\LocationService::copySubtree | ( | Location | $subtree,
|  | Location | $targetParentLocation
| ) |  |

Copies the subtree starting from $subtree as a new subtree of $targetLocation.

Only the items on which the user has read access are copied.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ createLocation()

eZ\Publish\API\Repository\LocationService::createLocation | ( | ContentInfo | $contentInfo,
|  | LocationCreateStruct | $locationCreateStruct
| ) |  |

Creates the new $location in the content repository for the given content.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, eZ\Publish\Core\Repository\SiteAccessAware\LocationService, and eZ\Publish\Core\Repository\LocationService.

## ◆ deleteLocation()

eZ\Publish\API\Repository\LocationService::deleteLocation | ( | Location | $location | ) |

Deletes $location and all its descendants.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ getAllLocationsCount()

eZ\Publish\API\Repository\LocationService::getAllLocationsCount | ( |  | ) |

Get the total number of all existing Locations.

Can be combined with loadAllLocations.

See also
  loadAllLocations

Returns
  int Total number of Locations

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, eZ\Publish\Core\Repository\SiteAccessAware\LocationService, and eZ\Publish\Core\Repository\LocationService.

## ◆ getLocationChildCount()

eZ\Publish\API\Repository\LocationService::getLocationChildCount | ( | Location | $location | ) |

Returns the number of children which are readable by the current user of a location object.

Parameters

  \eZ\Publish\API\Repository\Values\Content\Location | $location |

Returns
  int

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ hideLocation()

eZ\Publish\API\Repository\LocationService::hideLocation | ( | Location | $location | ) |

Hides the $location and marks invisible all descendants of $location.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ loadAllLocations()

eZ\Publish\API\Repository\LocationService::loadAllLocations | ( | int | $offset = `0`,
|  | int | $limit = `25`
| ) |  |

Bulk-load all existing Locations, constrained by $limit and $offset to paginate results.

Parameters

  int | $limit |
  int | $offset |

Returns
  \eZ\Publish\API\Repository\Values\Content\Location[]

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, eZ\Publish\Core\Repository\SiteAccessAware\LocationService, and eZ\Publish\Core\Repository\LocationService.

## ◆ loadLocation()

eZ\Publish\API\Repository\LocationService::loadLocation | ( |  | $locationId,
|  | array | $prioritizedLanguages = `null`,
|  | bool | $useAlwaysAvailable = `null`
| ) |  |

Loads a location object from its $locationId.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, eZ\Publish\Core\Repository\SiteAccessAware\LocationService, and eZ\Publish\Core\Repository\LocationService.

## ◆ loadLocationByRemoteId()

eZ\Publish\API\Repository\LocationService::loadLocationByRemoteId | ( |  | $remoteId,
|  | array | $prioritizedLanguages = `null`,
|  | bool | $useAlwaysAvailable = `null`
| ) |  |

Loads a location object from its $remoteId.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, eZ\Publish\Core\Repository\SiteAccessAware\LocationService, and eZ\Publish\Core\Repository\LocationService.

## ◆ loadLocationChildren()

eZ\Publish\API\Repository\LocationService::loadLocationChildren | ( | Location | $location,
|  |  | $offset = `0`,
|  |  | $limit = `25`,
|  | array | $prioritizedLanguages = `null`
| ) |  |

Loads children which are readable by the current user of a location object sorted by sortField and sortOrder.

Parameters

  \eZ\Publish\API\Repository\Values\Content\Location | $location |
  int | $offset | the start offset for paging
  int | $limit | the number of locations returned
  string[] | null | $prioritizedLanguages | Used as prioritized language code on translated properties of returned object.

Returns
  \eZ\Publish\API\Repository\Values\Content\LocationList

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ loadLocationList()

eZ\Publish\API\Repository\LocationService::loadLocationList | ( | array | $locationIds,
|  | array | $prioritizedLanguages = `null`,
|  | bool | $useAlwaysAvailable = `null`
| ) |  |

Loads several location objects from its $locationIds.

Returned list of Locations will be filtered by what is found and what current user has access to.

Parameters

  array | $locationIds |
  string[] | null | $prioritizedLanguages | Filter on and use as prioritized language code on translated properties of returned objects.
  bool | null | $useAlwaysAvailable | Respect always available flag on content when filtering on $prioritizedLanguages.

Returns
  \eZ\Publish\API\Repository\Values\Content\Location[]|iterable

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, eZ\Publish\Core\Repository\SiteAccessAware\LocationService, and eZ\Publish\Core\Repository\LocationService.

## ◆ loadLocations()

eZ\Publish\API\Repository\LocationService::loadLocations | ( | ContentInfo | $contentInfo,
|  | Location | $rootLocation = `null`,
|  | array | $prioritizedLanguages = `null`
| ) |  |

Loads the locations for the given content object.

If a $rootLocation is given, only locations that belong to this location are returned. The location list is also filtered by permissions on reading locations.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ loadParentLocationsForDraftContent()

eZ\Publish\API\Repository\LocationService::loadParentLocationsForDraftContent | ( | VersionInfo | $versionInfo,
|  | array | $prioritizedLanguages = `null`
| ) |  |

Load parent Locations for Content Draft.

Parameters

  \eZ\Publish\API\Repository\Values\Content\VersionInfo | $versionInfo |
  string[] | null | $prioritizedLanguages | Used as prioritized language code on translated properties of returned object.

Returns
  \eZ\Publish\API\Repository\Values\Content\Location[] List of parent Locations

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, eZ\Publish\Core\Repository\SiteAccessAware\LocationService, and eZ\Publish\Core\Repository\LocationService.

## ◆ moveSubtree()

eZ\Publish\API\Repository\LocationService::moveSubtree | ( | Location | $location,
|  | Location | $newParentLocation
| ) |  |

Moves the subtree to $newParentLocation.

If a user has the permission to move the location to a target location he can do it regardless of an existing descendant on which the user has no permission.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ newLocationCreateStruct()

eZ\Publish\API\Repository\LocationService::newLocationCreateStruct | ( |  | $parentLocationId | ) |

Instantiates a new location create class.

Parameters

  mixed | $parentLocationId | the parent under which the new location should be created

Returns
  \eZ\Publish\API\Repository\Values\Content\LocationCreateStruct

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ newLocationUpdateStruct()

eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct | ( |  | ) |

Instantiates a new location update class.

Returns
  \eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, eZ\Publish\Core\Repository\SiteAccessAware\LocationService, and eZ\Publish\Core\Repository\LocationService.

## ◆ swapLocation()

eZ\Publish\API\Repository\LocationService::swapLocation | ( | Location | $location1,
|  | Location | $location2
| ) |  |

Swaps the contents held by $location1 and $location2.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ unhideLocation()

eZ\Publish\API\Repository\LocationService::unhideLocation | ( | Location | $location | ) |

Unhides the $location.

This method and marks visible all descendants of $locations until a hidden location is found.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

## ◆ updateLocation()

eZ\Publish\API\Repository\LocationService::updateLocation | ( | Location | $location,
|  | LocationUpdateStruct | $locationUpdateStruct
| ) |  |

Updates $location in the content repository.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\LocationService, eZ\Publish\Core\REST\Client\LocationService, and eZ\Publish\Core\Repository\SiteAccessAware\LocationService.

The documentation for this interface was generated from the following file:

- API/Repository/LocationService.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.