PHP 클래스 eZ\Publish\Core\Persistence\Legacy\Content\Location\Handler

상속: implements eZ\Publish\SPI\Persistence\Content\Location\Handler
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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