PHP Класс eZ\Publish\Core\Persistence\Legacy\Content\Location\Handler

Наследование: implements eZ\Publish\SPI\Persistence\Content\Location\Handler
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$contentHandler eZ\Publish\Core\Persistence\Legacy\Content\Handler Content handler.
$locationGateway Gateway Gateway for handling location data.
$locationMapper Mapper Location locationMapper.
$objectStateHandler eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler Object state handler.
$treeHandler eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler Tree handler.

Открытые методы

Метод Описание
__construct ( Gateway $locationGateway, Mapper $locationMapper, Handler $contentHandler, Handler $objectStateHandler, TreeHandler $treeHandler ) : Handler Construct from userGateway.
changeMainLocation ( mixed $contentId, mixed $locationId ) Changes main location of content identified by given $contentId to location identified by given $locationId.
copySubtree ( mixed $sourceId, mixed $destinationParentId ) : eZ\Publish\SPI\Persistence\Content\Location Copy location object identified by $sourceId, into destination identified by $destinationParentId.
create ( eZ\Publish\SPI\Persistence\Content\Location\CreateStruct $createStruct ) : eZ\Publish\SPI\Persistence\Content\Location Creates a new location rooted at $location->parentId.
hide ( mixed $id ) Sets a location to be hidden, and it self + all children to invisible.
load ( integer $locationId ) : eZ\Publish\SPI\Persistence\Content\Location Loads the data for the location identified by $locationId.
loadByRemoteId ( string $remoteId ) : eZ\Publish\SPI\Persistence\Content\Location Loads the data for the location identified by $remoteId.
loadLocationsByContent ( integer $contentId, integer $rootLocationId = null ) : eZ\Publish\SPI\Persistence\Content\Location[] Loads all locations for $contentId, optionally limited to a sub tree identified by $rootLocationId.
loadParentLocationsForDraftContent ( $contentId )
loadSubtreeIds ( integer $locationId ) : array Loads the subtree ids of the location identified by $locationId.
markSubtreeModified ( integer | string $locationId, integer $timestamp = null ) Marks the given nodes and all ancestors as modified.
move ( mixed $sourceId, mixed $destinationParentId ) : boolean Moves location identified by $sourceId into new parent identified by $destinationParentId.
removeSubtree ( mixed $locationId ) : boolean Removes all Locations under and including $locationId.
setSectionForSubtree ( mixed $locationId, mixed $sectionId ) Set section on all content objects in the subtree.
swap ( mixed $locationId1, mixed $locationId2 ) : boolean Swaps the content object being pointed to by a location object.
unHide ( mixed $id ) Sets a location to be unhidden, and self + children to visible unless a parent is hiding the tree.
update ( eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct $location, integer $locationId ) Updates an existing location.

Защищенные методы

Метод Описание
getDefaultContentStates ( ) : eZ\Publish\SPI\Persistence\Content\ObjectState[] Returns an array of default content states with content state group id as key.
getParentPathString ( string $pathString ) : string Returns parent path string for a path string.
setContentStates ( eZ\Publish\SPI\Persistence\Content $content, array $contentStates )

Описание методов

__construct() публичный Метод

Construct from userGateway.
public __construct ( Gateway $locationGateway, Mapper $locationMapper, Handler $contentHandler, Handler $objectStateHandler, TreeHandler $treeHandler ) : Handler
$locationGateway Gateway
$locationMapper Mapper
$contentHandler eZ\Publish\Core\Persistence\Legacy\Content\Handler
$objectStateHandler eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler
$treeHandler eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler
Результат Handler

changeMainLocation() публичный Метод

Updates ezcontentobject_tree and eznode_assignment tables (eznode_assignment for content current version number).
public changeMainLocation ( mixed $contentId, mixed $locationId )
$contentId mixed
$locationId mixed

copySubtree() публичный Метод

Performs a deep copy of the location identified by $sourceId and all of its child locations, copying the most recent published content object for each location to a new content object without any additional version information. Relations are not copied. URLs are not touched at all.
public copySubtree ( mixed $sourceId, mixed $destinationParentId ) : eZ\Publish\SPI\Persistence\Content\Location
$sourceId mixed
$destinationParentId mixed
Результат eZ\Publish\SPI\Persistence\Content\Location the newly created Location.

create() публичный Метод

Creates a new location rooted at $location->parentId.
public create ( eZ\Publish\SPI\Persistence\Content\Location\CreateStruct $createStruct ) : eZ\Publish\SPI\Persistence\Content\Location
$createStruct eZ\Publish\SPI\Persistence\Content\Location\CreateStruct
Результат eZ\Publish\SPI\Persistence\Content\Location

getDefaultContentStates() защищенный Метод

Returns an array of default content states with content state group id as key.
protected getDefaultContentStates ( ) : eZ\Publish\SPI\Persistence\Content\ObjectState[]
Результат eZ\Publish\SPI\Persistence\Content\ObjectState[]

getParentPathString() защищенный Метод

Returns parent path string for a path string.
protected getParentPathString ( string $pathString ) : string
$pathString string
Результат string

hide() публичный Метод

Sets a location to be hidden, and it self + all children to invisible.
public hide ( mixed $id )
$id mixed Location ID

load() публичный Метод

Loads the data for the location identified by $locationId.
public load ( integer $locationId ) : eZ\Publish\SPI\Persistence\Content\Location
$locationId integer
Результат eZ\Publish\SPI\Persistence\Content\Location

loadByRemoteId() публичный Метод

Loads the data for the location identified by $remoteId.
public loadByRemoteId ( string $remoteId ) : eZ\Publish\SPI\Persistence\Content\Location
$remoteId string
Результат eZ\Publish\SPI\Persistence\Content\Location

loadLocationsByContent() публичный Метод

Loads all locations for $contentId, optionally limited to a sub tree identified by $rootLocationId.
public loadLocationsByContent ( integer $contentId, integer $rootLocationId = null ) : eZ\Publish\SPI\Persistence\Content\Location[]
$contentId integer
$rootLocationId integer
Результат eZ\Publish\SPI\Persistence\Content\Location[]

loadParentLocationsForDraftContent() публичный Метод

См. также: eZ\Publish\SPI\Persistence\Content\Location\Handler::loadParentLocationsForDraftContent
public loadParentLocationsForDraftContent ( $contentId )

loadSubtreeIds() публичный Метод

Loads the subtree ids of the location identified by $locationId.
public loadSubtreeIds ( integer $locationId ) : array
$locationId integer
Результат array Location ids are in the index, Content ids in the value.

markSubtreeModified() публичный Метод

Optionally a time stamp with the modification date may be specified, otherwise the current time is used.
public markSubtreeModified ( integer | string $locationId, integer $timestamp = null )
$locationId integer | string
$timestamp integer

move() публичный Метод

Performs a full move of the location identified by $sourceId to a new destination, identified by $destinationParentId. Relations do not need to be updated, since they refer to Content. URLs are not touched.
public move ( mixed $sourceId, mixed $destinationParentId ) : boolean
$sourceId mixed
$destinationParentId mixed
Результат boolean

removeSubtree() публичный Метод

Performs a recursive delete on the location identified by $locationId, including all of its child locations. Content which is not referred to by any other location is automatically removed. Content which looses its main Location will get the first of its other Locations assigned as the new main Location.
public removeSubtree ( mixed $locationId ) : boolean
$locationId mixed
Результат boolean

setContentStates() защищенный Метод

protected setContentStates ( eZ\Publish\SPI\Persistence\Content $content, array $contentStates )
$content eZ\Publish\SPI\Persistence\Content
$contentStates array

setSectionForSubtree() публичный Метод

Set section on all content objects in the subtree.
public setSectionForSubtree ( mixed $locationId, mixed $sectionId )
$locationId mixed
$sectionId mixed

swap() публичный Метод

Make the location identified by $locationId1 refer to the Content referred to by $locationId2 and vice versa.
public swap ( mixed $locationId1, mixed $locationId2 ) : boolean
$locationId1 mixed
$locationId2 mixed
Результат boolean

unHide() публичный Метод

If not make sure only children down to first hidden node is marked visible.
public unHide ( mixed $id )
$id mixed

update() публичный Метод

Updates an existing location.
public update ( eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct $location, integer $locationId )
$location eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct
$locationId integer

Описание свойств

$contentHandler защищенное свойство

Content handler.
protected Handler,eZ\Publish\Core\Persistence\Legacy\Content $contentHandler
Результат eZ\Publish\Core\Persistence\Legacy\Content\Handler

$locationGateway защищенное свойство

Gateway for handling location data.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content\Location $locationGateway
Результат Gateway

$locationMapper защищенное свойство

Location locationMapper.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content\Location $locationMapper
Результат Mapper

$objectStateHandler защищенное свойство

Object state handler.
protected Handler,eZ\Publish\Core\Persistence\Legacy\Content\ObjectState $objectStateHandler
Результат eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler

$treeHandler защищенное свойство

Tree handler.
protected TreeHandler,eZ\Publish\Core\Persistence\Legacy\Content $treeHandler
Результат eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler