PHP Class eZ\Publish\Core\SignalSlot\LocationService

Inheritance: implements eZ\Publish\API\Repository\LocationService
Datei anzeigen Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$service eZ\Publish\API\Repository\LocationService Aggregated service.
$signalDispatcher SignalDispatcher SignalDispatcher.

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\LocationService $service, SignalDispatcher $signalDispatcher ) Constructor.
copySubtree ( eZ\Publish\API\Repository\Values\Content\Location $subtree, eZ\Publish\API\Repository\Values\Content\Location $targetParentLocation ) : eZ\Publish\API\Repository\Values\Content\Location Copies the subtree starting from $subtree as a new subtree of $targetLocation.
createLocation ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\LocationCreateStruct $locationCreateStruct ) : eZ\Publish\API\Repository\Values\Content\Location Creates the new $location in the content repository for the given content.
deleteLocation ( eZ\Publish\API\Repository\Values\Content\Location $location ) Deletes $location and all its descendants.
getLocationChildCount ( eZ\Publish\API\Repository\Values\Content\Location $location ) : integer Returns the number of children which are readable by the current user of a location object.
hideLocation ( eZ\Publish\API\Repository\Values\Content\Location $location ) : eZ\Publish\API\Repository\Values\Content\Location Hides the $location and marks invisible all descendants of $location.
loadLocation ( mixed $locationId ) : eZ\Publish\API\Repository\Values\Content\Location Loads a location object from its $locationId.
loadLocationByRemoteId ( string $remoteId ) : eZ\Publish\API\Repository\Values\Content\Location Loads a location object from its $remoteId.
loadLocationChildren ( eZ\Publish\API\Repository\Values\Content\Location $location, integer $offset, integer $limit = 25 ) : eZ\Publish\API\Repository\Values\Content\LocationList Loads children which are readable by the current user of a location object sorted by sortField and sortOrder.
loadLocations ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\Location $rootLocation = null ) : eZ\Publish\API\Repository\Values\Content\Location[] Loads the locations for the given content object.
moveSubtree ( eZ\Publish\API\Repository\Values\Content\Location $location, eZ\Publish\API\Repository\Values\Content\Location $newParentLocation ) Moves the subtree to $newParentLocation.
newLocationCreateStruct ( mixed $parentLocationId ) : eZ\Publish\API\Repository\Values\Content\LocationCreateStruct Instantiates a new location create class.
newLocationUpdateStruct ( ) : eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct Instantiates a new location update class.
swapLocation ( eZ\Publish\API\Repository\Values\Content\Location $location1, eZ\Publish\API\Repository\Values\Content\Location $location2 ) Swaps the contents held by $location1 and $location2.
unhideLocation ( eZ\Publish\API\Repository\Values\Content\Location $location ) : eZ\Publish\API\Repository\Values\Content\Location Unhides the $location.
updateLocation ( eZ\Publish\API\Repository\Values\Content\Location $location, eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct $locationUpdateStruct ) : eZ\Publish\API\Repository\Values\Content\Location Updates $location in the content repository.

Method Details

__construct() public method

Construct service object from aggregated service and signal dispatcher
public __construct ( eZ\Publish\API\Repository\LocationService $service, SignalDispatcher $signalDispatcher )
$service eZ\Publish\API\Repository\LocationService
$signalDispatcher SignalDispatcher

copySubtree() public method

Only the items on which the user has read access are copied.
public copySubtree ( eZ\Publish\API\Repository\Values\Content\Location $subtree, eZ\Publish\API\Repository\Values\Content\Location $targetParentLocation ) : eZ\Publish\API\Repository\Values\Content\Location
$subtree eZ\Publish\API\Repository\Values\Content\Location - the subtree denoted by the location to copy
$targetParentLocation eZ\Publish\API\Repository\Values\Content\Location - the target parent location for the copy operation
return eZ\Publish\API\Repository\Values\Content\Location The newly created location of the copied subtree

createLocation() public method

Creates the new $location in the content repository for the given content.
public createLocation ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\LocationCreateStruct $locationCreateStruct ) : eZ\Publish\API\Repository\Values\Content\Location
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$locationCreateStruct eZ\Publish\API\Repository\Values\Content\LocationCreateStruct
return eZ\Publish\API\Repository\Values\Content\Location the newly created Location

deleteLocation() public method

Deletes $location and all its descendants.
public deleteLocation ( eZ\Publish\API\Repository\Values\Content\Location $location )
$location eZ\Publish\API\Repository\Values\Content\Location

getLocationChildCount() public method

Returns the number of children which are readable by the current user of a location object.
public getLocationChildCount ( eZ\Publish\API\Repository\Values\Content\Location $location ) : integer
$location eZ\Publish\API\Repository\Values\Content\Location
return integer

hideLocation() public method

Hides the $location and marks invisible all descendants of $location.
public hideLocation ( eZ\Publish\API\Repository\Values\Content\Location $location ) : eZ\Publish\API\Repository\Values\Content\Location
$location eZ\Publish\API\Repository\Values\Content\Location
return eZ\Publish\API\Repository\Values\Content\Location $location, with updated hidden value

loadLocation() public method

Loads a location object from its $locationId.
public loadLocation ( mixed $locationId ) : eZ\Publish\API\Repository\Values\Content\Location
$locationId mixed
return eZ\Publish\API\Repository\Values\Content\Location

loadLocationByRemoteId() public method

Loads a location object from its $remoteId.
public loadLocationByRemoteId ( string $remoteId ) : eZ\Publish\API\Repository\Values\Content\Location
$remoteId string
return eZ\Publish\API\Repository\Values\Content\Location

loadLocationChildren() public method

Loads children which are readable by the current user of a location object sorted by sortField and sortOrder.
public loadLocationChildren ( eZ\Publish\API\Repository\Values\Content\Location $location, integer $offset, integer $limit = 25 ) : eZ\Publish\API\Repository\Values\Content\LocationList
$location eZ\Publish\API\Repository\Values\Content\Location
$offset integer the start offset for paging
$limit integer the number of locations returned
return eZ\Publish\API\Repository\Values\Content\LocationList

loadLocations() public method

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.
public loadLocations ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\Location $rootLocation = null ) : eZ\Publish\API\Repository\Values\Content\Location[]
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$rootLocation eZ\Publish\API\Repository\Values\Content\Location
return eZ\Publish\API\Repository\Values\Content\Location[] An array of {@link Location}

moveSubtree() public method

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.
public moveSubtree ( eZ\Publish\API\Repository\Values\Content\Location $location, eZ\Publish\API\Repository\Values\Content\Location $newParentLocation )
$location eZ\Publish\API\Repository\Values\Content\Location
$newParentLocation eZ\Publish\API\Repository\Values\Content\Location

newLocationCreateStruct() public method

Instantiates a new location create class.
public newLocationCreateStruct ( mixed $parentLocationId ) : eZ\Publish\API\Repository\Values\Content\LocationCreateStruct
$parentLocationId mixed the parent under which the new location should be created
return eZ\Publish\API\Repository\Values\Content\LocationCreateStruct

newLocationUpdateStruct() public method

Instantiates a new location update class.
public newLocationUpdateStruct ( ) : eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct
return eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct

swapLocation() public method

Swaps the contents held by $location1 and $location2.
public swapLocation ( eZ\Publish\API\Repository\Values\Content\Location $location1, eZ\Publish\API\Repository\Values\Content\Location $location2 )
$location1 eZ\Publish\API\Repository\Values\Content\Location
$location2 eZ\Publish\API\Repository\Values\Content\Location

unhideLocation() public method

This method and marks visible all descendants of $locations until a hidden location is found.
public unhideLocation ( eZ\Publish\API\Repository\Values\Content\Location $location ) : eZ\Publish\API\Repository\Values\Content\Location
$location eZ\Publish\API\Repository\Values\Content\Location
return eZ\Publish\API\Repository\Values\Content\Location $location, with updated hidden value

updateLocation() public method

Updates $location in the content repository.
public updateLocation ( eZ\Publish\API\Repository\Values\Content\Location $location, eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct $locationUpdateStruct ) : eZ\Publish\API\Repository\Values\Content\Location
$location eZ\Publish\API\Repository\Values\Content\Location
$locationUpdateStruct eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct
return eZ\Publish\API\Repository\Values\Content\Location the updated Location

Property Details

$service protected_oe property

Aggregated service.
protected LocationService,eZ\Publish\API\Repository $service
return eZ\Publish\API\Repository\LocationService

$signalDispatcher protected_oe property

SignalDispatcher.
protected SignalDispatcher,eZ\Publish\Core\SignalSlot $signalDispatcher
return SignalDispatcher