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

Persistence/Legacy/Content/Location/Gateway.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Persistence\Legacy\Content\Location;
8
9 use eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct;
10 use eZ\Publish\SPI\Persistence\Content\Location\CreateStruct;
11
15 abstract class Gateway
16 {
20 const NODE_ASSIGNMENT_OP_CODE_NOP = 0;
21 const NODE_ASSIGNMENT_OP_CODE_EXECUTE = 1;
22 const NODE_ASSIGNMENT_OP_CODE_CREATE_NOP = 2;
23 const NODE_ASSIGNMENT_OP_CODE_CREATE = 3;
24 const NODE_ASSIGNMENT_OP_CODE_MOVE_NOP = 4;
25 const NODE_ASSIGNMENT_OP_CODE_MOVE = 5;
26 const NODE_ASSIGNMENT_OP_CODE_REMOVE_NOP = 6;
27 const NODE_ASSIGNMENT_OP_CODE_REMOVE = 7;
28 const NODE_ASSIGNMENT_OP_CODE_SET_NOP = 8;
29 const NODE_ASSIGNMENT_OP_CODE_SET = 9;
30
42 abstract public function getBasicNodeData($nodeId, array $translations = null, bool $useAlwaysAvailable = true);
43
53 abstract public function getNodeDataList(array $locationIds, array $translations = null, bool $useAlwaysAvailable = true): iterable;
54
66 abstract public function getBasicNodeDataByRemoteId($remoteId, array $translations = null, bool $useAlwaysAvailable = true);
67
77 abstract public function loadLocationDataByContent($contentId, $rootLocationId = null);
78
85 abstract public function loadLocationDataByTrashContent(int $contentId, ?int $rootLocationId = null): array;
86
94 abstract public function loadParentLocationsDataForDraftContent($contentId);
95
104 abstract public function getSubtreeContent($sourceId, $onlyIds = false);
105
113 abstract public function getChildren($locationId);
114
126 abstract public function moveSubtreeNodes(array $fromPathString, array $toPathString);
127
136 abstract public function updateSubtreeModificationTime($pathString, $timestamp = null);
137
146 abstract public function updateNodeAssignment($contentObjectId, $oldParent, $newParent, $opcode);
147
156 abstract public function createLocationsFromNodeAssignments($contentId, $versionNo);
157
164 abstract public function updateLocationsContentVersionNo($contentId, $versionNo);
165
171 abstract public function hideSubtree($pathString);
172
179 abstract public function unHideSubtree($pathString);
180
184 abstract public function setNodeWithChildrenInvisible(string $pathString): void;
185
189 abstract public function setNodeWithChildrenVisible(string $pathString): void;
190
194 abstract public function setNodeHidden(string $pathString): void;
195
199 abstract public function setNodeUnhidden(string $pathString): void;
200
212 abstract public function swap(int $locationId1, int $locationId2): bool;
213
222 abstract public function create(CreateStruct $createStruct, array $parentNode);
223
231 abstract public function createNodeAssignment(CreateStruct $createStruct, $parentNodeId, $type = self::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP);
232
239 abstract public function deleteNodeAssignment($contentId, $versionNo = null);
240
249 abstract public function update(UpdateStruct $location, $locationId);
250
258 abstract public function updatePathIdentificationString($locationId, $parentLocationId, $text);
259
265 abstract public function removeLocation($locationId);
266
279 abstract public function getFallbackMainNodeData($contentId, $locationId);
280
290 abstract public function trashLocation($locationId);
291
305 abstract public function untrashLocation($locationId, $newParentId = null);
306
314 abstract public function loadTrashByLocation($locationId);
315
322 abstract public function cleanupTrash();
323
334 abstract public function listTrashed($offset, $limit, array $sort = null);
335
339 abstract public function countTrashed(): int;
340
347 abstract public function removeElementFromTrash($id);
348
357 abstract public function setSectionForSubtree($pathString, $sectionId);
358
366 abstract public function countLocationsByContentId($contentId);
367
380 abstract public function changeMainLocation($contentId, $locationId, $versionNo, $parentLocationId);
381
389 abstract public function countAllLocations();
390
399 abstract public function loadAllLocationsData($offset, $limit);
400 }
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway
Base class for location gateways.
Definition: Persistence/Legacy/Content/Location/Gateway.php:16
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\trashLocation
trashLocation($locationId)
Sends a single location identified by given $locationId to the trash.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\getFallbackMainNodeData
getFallbackMainNodeData($contentId, $locationId)
Returns id of the next in line node to be set as a new main node.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\update
update(UpdateStruct $location, $locationId)
Updates an existing location.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_SET_NOP
const NODE_ASSIGNMENT_OP_CODE_SET_NOP
Definition: Persistence/Legacy/Content/Location/Gateway.php:28
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\loadTrashByLocation
loadTrashByLocation($locationId)
Loads trash data specified by location ID.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\unHideSubtree
unHideSubtree($pathString)
Sets a location to be unhidden, and self + children to visible unless a parent is hiding the tree.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\setNodeWithChildrenVisible
setNodeWithChildrenVisible(string $pathString)
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\createLocationsFromNodeAssignments
createLocationsFromNodeAssignments($contentId, $versionNo)
Create locations from node assignments.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\getChildren
getChildren($locationId)
Returns data for the first level children of the location identified by given $locationId.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_EXECUTE
const NODE_ASSIGNMENT_OP_CODE_EXECUTE
Definition: Persistence/Legacy/Content/Location/Gateway.php:21
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_CREATE_NOP
const NODE_ASSIGNMENT_OP_CODE_CREATE_NOP
Definition: Persistence/Legacy/Content/Location/Gateway.php:22
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\updateLocationsContentVersionNo
updateLocationsContentVersionNo($contentId, $versionNo)
Updates all Locations of content identified with $contentId with $versionNo.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\updateSubtreeModificationTime
updateSubtreeModificationTime($pathString, $timestamp=null)
Updated subtree modification time for all nodes on path.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_REMOVE_NOP
const NODE_ASSIGNMENT_OP_CODE_REMOVE_NOP
Definition: Persistence/Legacy/Content/Location/Gateway.php:26
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\untrashLocation
untrashLocation($locationId, $newParentId=null)
Returns a trashed location to normal state.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\loadAllLocationsData
loadAllLocationsData($offset, $limit)
Load data of every Location, except the Root node.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\create
create(CreateStruct $createStruct, array $parentNode)
Creates a new location in given $parentNode.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\removeLocation
removeLocation($locationId)
Deletes ezcontentobject_tree row for given $locationId (node_id).
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\createNodeAssignment
createNodeAssignment(CreateStruct $createStruct, $parentNodeId, $type=self::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP)
Create an entry in the node assignment table.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\setNodeWithChildrenInvisible
setNodeWithChildrenInvisible(string $pathString)
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_NOP
const NODE_ASSIGNMENT_OP_CODE_NOP
Constants for node assignment op codes.
Definition: Persistence/Legacy/Content/Location/Gateway.php:20
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_SET
const NODE_ASSIGNMENT_OP_CODE_SET
Definition: Persistence/Legacy/Content/Location/Gateway.php:29
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\countLocationsByContentId
countLocationsByContentId($contentId)
Returns how many locations given content object identified by $contentId has.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\cleanupTrash
cleanupTrash()
Removes every entries in the trash.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\getNodeDataList
getNodeDataList(array $locationIds, array $translations=null, bool $useAlwaysAvailable=true)
Returns an array with node data for several locations.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\moveSubtreeNodes
moveSubtreeNodes(array $fromPathString, array $toPathString)
Update path strings to move nodes in the ezcontentobject_tree table.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\loadParentLocationsDataForDraftContent
loadParentLocationsDataForDraftContent($contentId)
Loads data for all parent Locations for unpublished Content by given $contentId.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\loadLocationDataByTrashContent
loadLocationDataByTrashContent(int $contentId, ?int $rootLocationId=null)
Loads data for all Locations for $contentId in trash, optionally only in the subtree starting at $roo...
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_REMOVE
const NODE_ASSIGNMENT_OP_CODE_REMOVE
Definition: Persistence/Legacy/Content/Location/Gateway.php:27
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\swap
swap(int $locationId1, int $locationId2)
Swaps the content object being pointed to by a location object.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\deleteNodeAssignment
deleteNodeAssignment($contentId, $versionNo=null)
Deletes node assignment for given $contentId and $versionNo.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\changeMainLocation
changeMainLocation($contentId, $locationId, $versionNo, $parentLocationId)
Changes main location of content identified by given $contentId to location identified by given $loca...
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\countTrashed
countTrashed()
Count trashed items.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\setSectionForSubtree
setSectionForSubtree($pathString, $sectionId)
Set section on all content objects in the subtree.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\hideSubtree
hideSubtree($pathString)
Sets a location to be hidden, and it self + all children to invisible.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\getSubtreeContent
getSubtreeContent($sourceId, $onlyIds=false)
Find all content in the given subtree.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\getBasicNodeData
getBasicNodeData($nodeId, array $translations=null, bool $useAlwaysAvailable=true)
Returns an array with basic node data.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\setNodeHidden
setNodeHidden(string $pathString)
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_MOVE
const NODE_ASSIGNMENT_OP_CODE_MOVE
Definition: Persistence/Legacy/Content/Location/Gateway.php:25
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_CREATE
const NODE_ASSIGNMENT_OP_CODE_CREATE
Definition: Persistence/Legacy/Content/Location/Gateway.php:23
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\getBasicNodeDataByRemoteId
getBasicNodeDataByRemoteId($remoteId, array $translations=null, bool $useAlwaysAvailable=true)
Returns an array with basic node data for the node with $remoteId.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\countAllLocations
countAllLocations()
Get the total number of all Locations, except the Root node.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\listTrashed
listTrashed($offset, $limit, array $sort=null)
Lists trashed items.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\updatePathIdentificationString
updatePathIdentificationString($locationId, $parentLocationId, $text)
Updates path identification string for given $locationId.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\removeElementFromTrash
removeElementFromTrash($id)
Removes trashed element identified by $id from trash.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\setNodeUnhidden
setNodeUnhidden(string $pathString)
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\NODE_ASSIGNMENT_OP_CODE_MOVE_NOP
const NODE_ASSIGNMENT_OP_CODE_MOVE_NOP
Definition: Persistence/Legacy/Content/Location/Gateway.php:24
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\updateNodeAssignment
updateNodeAssignment($contentObjectId, $oldParent, $newParent, $opcode)
Update node assignment table.
eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\loadLocationDataByContent
loadLocationDataByContent($contentId, $rootLocationId=null)
Loads data for all Locations for $contentId, optionally only in the subtree starting at $rootLocation...
eZ\Publish\SPI\Persistence\Content\CreateStruct
Definition: SPI/Persistence/Content/CreateStruct.php:12
eZ\Publish\SPI\Persistence\Content\Location\CreateStruct
Definition: SPI/Persistence/Content/Location/CreateStruct.php:12
eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct
Definition: Content/Location/UpdateStruct.php:12
eZ\Publish\SPI\Persistence\Content\Location
Struct containing accessible properties on Location entities.
Definition: SPI/Persistence/Content/Location.php:15
eZ\Publish\SPI\Persistence\Content\Location\$remoteId
$remoteId
Definition: SPI/Persistence/Content/Location.php:73
eZ\Publish\SPI\Persistence\Content\Location\$contentId
$contentId
Definition: SPI/Persistence/Content/Location.php:80
eZ\Publish\SPI\Persistence\Content\Location\$id
$id
Definition: SPI/Persistence/Content/Location.php:39
eZ\Publish\SPI\Persistence\Content\Location\$pathString
$pathString
Definition: SPI/Persistence/Content/Location.php:105
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.