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

Наследование: extends eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway
Показать файл Открыть проект

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

Свойство Тип Описание
$innerGateway eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway The wrapped gateway.

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

Метод Описание
__construct ( Gateway $innerGateway ) Creates a new exception conversion gateway around $innerGateway.
changeMainLocation ( mixed $contentId, mixed $locationId, mixed $versionNo, mixed $parentLocationId ) Changes main location of content identified by given $contentId to location identified by given $locationId.
cleanupTrash ( ) Removes every entries in the trash.
countLocationsByContentId ( integer $contentId ) : integer Returns how many locations given content object identified by $contentId has.
create ( eZ\Publish\SPI\Persistence\Content\Location\CreateStruct $createStruct, array $parentNode ) : eZ\Publish\SPI\Persistence\Content\Location Creates a new location in given $parentNode.
createLocationsFromNodeAssignments ( mixed $contentId, mixed $versionNo ) Create locations from node assignments.
createNodeAssignment ( eZ\Publish\SPI\Persistence\Content\Location\CreateStruct $createStruct, mixed $parentNodeId, integer $type = self::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP ) Create an entry in the node assignment table.
deleteNodeAssignment ( integer $contentId, integer $versionNo = null ) Deletes node assignment for given $contentId and $versionNo.
find ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion, integer $offset, integer | null $limit = null, array $sortClauses = null ) : mixed[][] Returns total count and data for all Locations satisfying the parameters.
getBasicNodeData ( mixed $nodeId ) : array Returns an array with basic node data.
getBasicNodeDataByRemoteId ( mixed $remoteId ) : array Returns an array with basic node data for the node with $remoteId.
getChildren ( mixed $locationId ) : array Returns data for the first level children of the location identified by given $locationId.
getFallbackMainNodeData ( mixed $contentId, mixed $locationId ) : array Returns id of the next in line node to be set as a new main node.
getSubtreeContent ( mixed $sourceId, boolean $onlyIds = false ) : array Find all content in the given subtree.
hideSubtree ( string $pathString ) Sets a location to be hidden, and it self + all children to invisible.
listTrashed ( integer $offset, integer $limit, array $sort = null ) : array Lists trashed items.
loadLocationDataByContent ( integer $contentId, integer $rootLocationId = null ) : array Loads data for all Locations for $contentId, optionally only in the subtree starting at $rootLocationId.
loadParentLocationsDataForDraftContent ( $contentId )
loadTrashByLocation ( mixed $locationId ) : array Loads trash data specified by location ID.
moveSubtreeNodes ( array $fromPathString, array $toPathString ) Update path strings to move nodes in the ezcontentobject_tree table.
removeElementFromTrash ( integer $id ) Removes trashed element identified by $id from trash.
removeLocation ( mixed $locationId ) Deletes ezcontentobject_tree row for given $locationId (node_id).
setSectionForSubtree ( mixed $pathString, mixed $sectionId ) : boolean 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.
trashLocation ( mixed $locationId ) : boolean Sends a single location identified by given $locationId to the trash.
unHideSubtree ( string $pathString ) Sets a location to be unhidden, and self + children to visible unless a parent is hiding the tree.
untrashLocation ( mixed $locationId, mixed $newParentId = null ) : eZ\Publish\SPI\Persistence\Content\Location Returns a trashed location to normal state.
update ( eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct $location, integer $locationId ) Updates an existing location.
updateLocationsContentVersionNo ( mixed $contentId, mixed $versionNo ) Updates all Locations of content identified with $contentId with $versionNo.
updateNodeAssignment ( integer $contentObjectId, integer $oldParent, integer $newParent, integer $opcode ) Update node assignment table.
updatePathIdentificationString ( mixed $locationId, mixed $parentLocationId, string $text ) Updates path identification string for given $locationId.
updateSubtreeModificationTime ( string $pathString, integer | null $timestamp = null ) Updated subtree modification time for all nodes on path.

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

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

Creates a new exception conversion gateway around $innerGateway.
public __construct ( Gateway $innerGateway )
$innerGateway eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway

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

Updates ezcontentobject_tree table for the given $contentId and eznode_assignment table for the given $contentId, $parentLocationId and $versionNo
public changeMainLocation ( mixed $contentId, mixed $locationId, mixed $versionNo, mixed $parentLocationId )
$contentId mixed
$locationId mixed
$versionNo mixed version number, needed to update eznode_assignment table
$parentLocationId mixed parent location of location identified by $locationId, needed to update eznode_assignment table

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

Will NOT remove associated content objects nor attributes. Basically truncates ezcontentobject_trash table.
public cleanupTrash ( )

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

Returns how many locations given content object identified by $contentId has.
public countLocationsByContentId ( integer $contentId ) : integer
$contentId integer
Результат integer

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

Creates a new location in given $parentNode.
public create ( eZ\Publish\SPI\Persistence\Content\Location\CreateStruct $createStruct, array $parentNode ) : eZ\Publish\SPI\Persistence\Content\Location
$createStruct eZ\Publish\SPI\Persistence\Content\Location\CreateStruct
$parentNode array
Результат eZ\Publish\SPI\Persistence\Content\Location

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

Convert existing node assignments into real locations.
public createLocationsFromNodeAssignments ( mixed $contentId, mixed $versionNo )
$contentId mixed
$versionNo mixed

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

Create an entry in the node assignment table.
public createNodeAssignment ( eZ\Publish\SPI\Persistence\Content\Location\CreateStruct $createStruct, mixed $parentNodeId, integer $type = self::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP )
$createStruct eZ\Publish\SPI\Persistence\Content\Location\CreateStruct
$parentNodeId mixed
$type integer

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

Deletes node assignment for given $contentId and $versionNo.
public deleteNodeAssignment ( integer $contentId, integer $versionNo = null )
$contentId integer
$versionNo integer

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

Returns total count and data for all Locations satisfying the parameters.
public find ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion, integer $offset, integer | null $limit = null, array $sortClauses = null ) : mixed[][]
$criterion eZ\Publish\API\Repository\Values\Content\Query\Criterion
$offset integer
$limit integer | null
$sortClauses array
Результат mixed[][]

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

We might want to cache this, since this method is used by about every method in the location handler.
public getBasicNodeData ( mixed $nodeId ) : array
$nodeId mixed
Результат array

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

Returns an array with basic node data for the node with $remoteId.
public getBasicNodeDataByRemoteId ( mixed $remoteId ) : array
$remoteId mixed
Результат array

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

Returns data for the first level children of the location identified by given $locationId.
public getChildren ( mixed $locationId ) : array
$locationId mixed
Результат array

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

This returns lowest node id for content identified by $contentId, and not of the node identified by given $locationId (current main node). Assumes that content has more than one location.
public getFallbackMainNodeData ( mixed $contentId, mixed $locationId ) : array
$contentId mixed
$locationId mixed
Результат array

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

Find all content in the given subtree.
public getSubtreeContent ( mixed $sourceId, boolean $onlyIds = false ) : array
$sourceId mixed
$onlyIds boolean
Результат array

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

Sets a location to be hidden, and it self + all children to invisible.
public hideSubtree ( string $pathString )
$pathString string

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

Returns entries from ezcontentobject_trash.
public listTrashed ( integer $offset, integer $limit, array $sort = null ) : array
$offset integer
$limit integer
$sort array
Результат array

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

Loads data for all Locations for $contentId, optionally only in the subtree starting at $rootLocationId.
public loadLocationDataByContent ( integer $contentId, integer $rootLocationId = null ) : array
$contentId integer
$rootLocationId integer
Результат array

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

См. также: eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway::loadParentLocationsDataForDraftContent

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

Loads trash data specified by location ID.
public loadTrashByLocation ( mixed $locationId ) : array
$locationId mixed
Результат array

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

This query can likely be optimized to use some more advanced string operations, which then depend on the respective database.
public moveSubtreeNodes ( array $fromPathString, array $toPathString )
$fromPathString array
$toPathString array

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

Will NOT remove associated content object nor attributes.
public removeElementFromTrash ( integer $id )
$id integer The trashed location Id

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

Deletes ezcontentobject_tree row for given $locationId (node_id).
public removeLocation ( mixed $locationId )
$locationId mixed

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

Set section on all content objects in the subtree.
public setSectionForSubtree ( mixed $pathString, mixed $sectionId ) : boolean
$pathString mixed
$sectionId mixed
Результат boolean

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

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

The associated content object is left untouched.
public trashLocation ( mixed $locationId ) : boolean
$locationId mixed
Результат boolean

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

If not make sure only children down to first hidden node is marked visible.
public unHideSubtree ( string $pathString )
$pathString string

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

Recreates the originally trashed location in the new position. If no new position has been specified, it will be tried to re-create the location at the old position. If this is not possible ( because the old location does not exist any more) and exception is thrown.
public untrashLocation ( mixed $locationId, mixed $newParentId = null ) : eZ\Publish\SPI\Persistence\Content\Location
$locationId mixed
$newParentId mixed
Результат eZ\Publish\SPI\Persistence\Content\Location

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

Will not throw anything if location id is invalid or no entries are affected.
public update ( eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct $location, integer $locationId )
$location eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct
$locationId integer

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

Updates all Locations of content identified with $contentId with $versionNo.
public updateLocationsContentVersionNo ( mixed $contentId, mixed $versionNo )
$contentId mixed
$versionNo mixed

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

Update node assignment table.
public updateNodeAssignment ( integer $contentObjectId, integer $oldParent, integer $newParent, integer $opcode )
$contentObjectId integer
$oldParent integer
$newParent integer
$opcode integer

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

Updates path identification string for given $locationId.
public updatePathIdentificationString ( mixed $locationId, mixed $parentLocationId, string $text )
$locationId mixed
$parentLocationId mixed
$text string

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

Updated subtree modification time for all nodes on path.
public updateSubtreeModificationTime ( string $pathString, integer | null $timestamp = null )
$pathString string
$timestamp integer | null

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

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

The wrapped gateway.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content\Location $innerGateway
Результат eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway