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

LocationHandler.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Persistence\Cache;
8
9 use eZ\Publish\SPI\Persistence\Content\Location;
10 use eZ\Publish\SPI\Persistence\Content\Location\CreateStruct;
11 use eZ\Publish\SPI\Persistence\Content\Location\Handler as LocationHandlerInterface;
12 use eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct;
13
17 class LocationHandler extends AbstractInMemoryPersistenceHandler implements LocationHandlerInterface
18 {
19 private const CONTENT_IDENTIFIER = 'content';
20 private const LOCATION_IDENTIFIER = 'location';
21 private const LOCATION_PATH_IDENTIFIER = 'location_path';
22 private const LOCATION_REMOTE_ID_IDENTIFIER = 'location_remote_id';
23 private const LOCATION_SUBTREE_IDENTIFIER = 'location_subtree';
24 private const CONTENT_LOCATIONS_IDENTIFIER = 'content_locations';
25 private const CONTENT_LOCATIONS_WITH_PARENT_FOR_DRAFT_SUFFIX_IDENTIFIER = 'content_locations_with_parent_for_draft_suffix';
26 private const PARENT_FOR_DRAFT_SUFFIX = 'parent_for_draft_suffix';
27 private const ROLE_ASSIGNMENT_GROUP_LIST_IDENTIFIER = 'role_assignment_group_list';
28
30 private $getLocationTags;
31
33 private $getLocationKeys;
34
35 protected function init(): void
36 {
37 $this->getLocationTags = function (Location $location) {
38 $tags = [
39 $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$location->contentId]),
40 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$location->id]),
41 ];
42
43 $pathIds = $this->locationPathConverter->convertToPathIds($location->pathString);
44 foreach ($pathIds as $pathId) {
45 $tags[] = $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$pathId]);
46 }
47
48 return $tags;
49 };
50
51 $this->getLocationKeys = function (Location $location, $keySuffix = '-1') {
52 return [
53 $this->cacheIdentifierGenerator->generateKey(self::LOCATION_IDENTIFIER, [$location->id], true) . $keySuffix,
54 $this->cacheIdentifierGenerator->generateKey(
55 self::LOCATION_REMOTE_ID_IDENTIFIER,
56 [$this->cacheIdentifierSanitizer->escapeForCacheKey($location->remoteId)],
57 true
58 ) . $keySuffix,
59 ];
60 };
61 }
62
66 public function load($locationId, array $translations = null, bool $useAlwaysAvailable = true)
67 {
68 $keySuffix = '-' . $this->getCacheTranslationKey($translations, $useAlwaysAvailable);
69 $getLocationKeysFn = $this->getLocationKeys;
70
71 return $this->getCacheValue(
72 (int) $locationId,
73 $this->cacheIdentifierGenerator->generateKey(self::LOCATION_IDENTIFIER, [], true) . '-',
74 function ($id) use ($translations, $useAlwaysAvailable) {
75 return $this->persistenceHandler->locationHandler()->load($id, $translations, $useAlwaysAvailable);
76 },
77 $this->getLocationTags,
78 static function (Location $location) use ($keySuffix, $getLocationKeysFn) {
79 return $getLocationKeysFn($location, $keySuffix);
80 },
81 $keySuffix,
82 ['location' => $locationId, 'translations' => $translations, 'alwaysAvailable' => $useAlwaysAvailable]
83 );
84 }
85
86 public function loadList(array $locationIds, array $translations = null, bool $useAlwaysAvailable = true): iterable
87 {
88 $keySuffix = '-' . $this->getCacheTranslationKey($translations, $useAlwaysAvailable);
89 $getLocationKeysFn = $this->getLocationKeys;
90
91 return $this->getMultipleCacheValues(
92 $locationIds,
93 $this->cacheIdentifierGenerator->generateKey(self::LOCATION_IDENTIFIER, [], true) . '-',
94 function (array $ids) use ($translations, $useAlwaysAvailable) {
95 return $this->persistenceHandler->locationHandler()->loadList($ids, $translations, $useAlwaysAvailable);
96 },
97 $this->getLocationTags,
98 static function (Location $location) use ($keySuffix, $getLocationKeysFn) {
99 return $getLocationKeysFn($location, $keySuffix);
100 },
101 $keySuffix,
102 ['location' => $locationIds, 'translations' => $translations, 'alwaysAvailable' => $useAlwaysAvailable]
103 );
104 }
105
109 public function loadSubtreeIds($locationId)
110 {
111 return $this->getCacheValue(
112 (int) $locationId,
113 $this->cacheIdentifierGenerator->generateKey(self::LOCATION_SUBTREE_IDENTIFIER, [], true) . '-',
114 function (int $locationId): array {
115 return $this->persistenceHandler->locationHandler()->loadSubtreeIds($locationId);
116 },
117 function (array $locationIds) use ($locationId): array {
118 $cacheTags = [
119 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$locationId]),
120 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$locationId]),
121 ];
122
123 foreach ($locationIds as $id) {
124 $cacheTags[] = $this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$id]);
125 $cacheTags[] = $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$id]);
126 }
127
128 return $cacheTags;
129 },
130 function () use ($locationId): array {
131 return [
132 $this->cacheIdentifierGenerator->generateKey(self::LOCATION_SUBTREE_IDENTIFIER, [$locationId], true),
133 ];
134 }
135 );
136 }
137
141 public function loadLocationsByContent($contentId, $rootLocationId = null)
142 {
143 $keySuffix = '';
144 $cacheTags = [
145 $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$contentId]),
146 ];
147
148 if ($rootLocationId) {
149 $keySuffix = '-root-' . $rootLocationId;
150 $cacheTags[] = $this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$rootLocationId]);
151 $cacheTags[] = $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$rootLocationId]);
152 }
153
154 return $this->getCacheValue(
155 (int) $contentId,
156 $this->cacheIdentifierGenerator->generateKey(self::CONTENT_LOCATIONS_IDENTIFIER, [], true) . '-',
157 function (int $contentId) use ($rootLocationId): array {
158 return $this->persistenceHandler->locationHandler()->loadLocationsByContent($contentId, $rootLocationId);
159 },
160 function (array $locations) use ($cacheTags): array {
161 foreach ($locations as $location) {
162 $cacheTags = $this->getCacheTags($location, $cacheTags);
163 }
164
165 return $cacheTags;
166 },
167 function () use ($contentId, $keySuffix): array {
168 return [
169 $this->cacheIdentifierGenerator->generateTag(
170 self::CONTENT_LOCATIONS_IDENTIFIER,
171 [$contentId],
172 true
173 ) . $keySuffix,
174 ];
175 },
176 $keySuffix
177 );
178 }
179
183 public function loadLocationsByTrashContent(int $contentId, ?int $rootLocationId = null): array
184 {
185 $this->logger->logCall(__METHOD__, ['content' => $contentId, 'root' => $rootLocationId]);
186
187 return $this->persistenceHandler->locationHandler()->loadLocationsByTrashContent($contentId, $rootLocationId);
188 }
189
193 public function loadParentLocationsForDraftContent($contentId)
194 {
195 return $this->getCacheValue(
196 (int) $contentId,
197 $this->cacheIdentifierGenerator->generateKey(self::CONTENT_LOCATIONS_IDENTIFIER, [], true) . '-',
198 function (int $contentId): array {
199 return $this->persistenceHandler->locationHandler()->loadParentLocationsForDraftContent($contentId);
200 },
201 function (array $locations) use ($contentId): array {
202 $cacheTags = [
203 $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$contentId]),
204 ];
205
206 foreach ($locations as $location) {
207 $cacheTags = $this->getCacheTags($location, $cacheTags);
208 }
209
210 return $cacheTags;
211 },
212 function () use ($contentId): array {
213 return [
214 $this->cacheIdentifierGenerator->generateKey(
215 self::CONTENT_LOCATIONS_WITH_PARENT_FOR_DRAFT_SUFFIX_IDENTIFIER,
216 [$contentId],
217 true
218 ),
219 ];
220 },
221 $this->cacheIdentifierGenerator->generateKey(self::PARENT_FOR_DRAFT_SUFFIX)
222 );
223 }
224
228 public function loadByRemoteId($remoteId, array $translations = null, bool $useAlwaysAvailable = true)
229 {
230 $keySuffix = '-' . $this->getCacheTranslationKey($translations, $useAlwaysAvailable);
231 $getLocationKeysFn = $this->getLocationKeys;
232
233 return $this->getCacheValue(
234 $this->cacheIdentifierSanitizer->escapeForCacheKey($remoteId),
235 $this->cacheIdentifierGenerator->generateKey(self::LOCATION_REMOTE_ID_IDENTIFIER, [], true) . '-',
236 function () use ($remoteId, $translations, $useAlwaysAvailable) {
237 return $this->persistenceHandler->locationHandler()->loadByRemoteId($remoteId, $translations, $useAlwaysAvailable);
238 },
239 $this->getLocationTags,
240 static function (Location $location) use ($keySuffix, $getLocationKeysFn) {
241 return $getLocationKeysFn($location, $keySuffix);
242 },
243 $keySuffix,
244 ['location' => $remoteId, 'translations' => $translations, 'alwaysAvailable' => $useAlwaysAvailable]
245 );
246 }
247
251 public function copySubtree($sourceId, $destinationParentId, $newOwnerId = null)
252 {
253 $this->logger->logCall(__METHOD__, [
254 'source' => $sourceId,
255 'destination' => $destinationParentId,
256 'newOwner' => $newOwnerId,
257 ]);
258
259 return $this->persistenceHandler->locationHandler()->copySubtree($sourceId, $destinationParentId, $newOwnerId);
260 }
261
265 public function move($sourceId, $destinationParentId)
266 {
267 $this->logger->logCall(__METHOD__, ['source' => $sourceId, 'destination' => $destinationParentId]);
268 $return = $this->persistenceHandler->locationHandler()->move($sourceId, $destinationParentId);
269
270 $this->cache->invalidateTags([
271 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$sourceId]),
272 ]);
273
274 return $return;
275 }
276
280 public function markSubtreeModified($locationId, $timestamp = null)
281 {
282 $this->logger->logCall(__METHOD__, ['location' => $locationId, 'time' => $timestamp]);
283 $this->persistenceHandler->locationHandler()->markSubtreeModified($locationId, $timestamp);
284 }
285
289 public function hide($locationId)
290 {
291 $this->logger->logCall(__METHOD__, ['location' => $locationId]);
292 $return = $this->persistenceHandler->locationHandler()->hide($locationId);
293
294 $this->cache->invalidateTags([
295 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$locationId]),
296 ]);
297
298 return $return;
299 }
300
304 public function unHide($locationId)
305 {
306 $this->logger->logCall(__METHOD__, ['location' => $locationId]);
307 $return = $this->persistenceHandler->locationHandler()->unHide($locationId);
308
309 $this->cache->invalidateTags([
310 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$locationId]),
311 ]);
312
313 return $return;
314 }
315
321 public function setInvisible(int $id): void
322 {
323 $this->logger->logCall(__METHOD__, ['location' => $id]);
324 $this->persistenceHandler->locationHandler()->setInvisible($id);
325
326 $this->cache->invalidateTags([
327 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$id]),
328 ]);
329 }
330
336 public function setVisible(int $id): void
337 {
338 $this->logger->logCall(__METHOD__, ['location' => $id]);
339 $this->persistenceHandler->locationHandler()->setVisible($id);
340
341 $this->cache->invalidateTags([
342 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$id]),
343 ]);
344 }
345
349 public function swap($locationId1, $locationId2)
350 {
351 $this->logger->logCall(__METHOD__, ['location1' => $locationId1, 'location2' => $locationId2]);
352 $locationHandler = $this->persistenceHandler->locationHandler();
353
354 $return = $locationHandler->swap($locationId1, $locationId2);
355
356 $this->cache->invalidateTags(
357 [
358 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$locationId1]),
359 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$locationId2]),
360 ]
361 );
362
363 return $return;
364 }
365
369 public function update(UpdateStruct $struct, $locationId)
370 {
371 $this->logger->logCall(__METHOD__, ['location' => $locationId, 'struct' => $struct]);
372 $this->persistenceHandler->locationHandler()->update($struct, $locationId);
373
374 $this->cache->invalidateTags([
375 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$locationId]),
376 ]);
377 }
378
382 public function create(CreateStruct $locationStruct)
383 {
384 $this->logger->logCall(__METHOD__, ['struct' => $locationStruct]);
385 $location = $this->persistenceHandler->locationHandler()->create($locationStruct);
386
387 // need to clear loadLocationsByContent and similar collections involving locations data
388 // also need to clear content info on main location changes
389 $this->cache->invalidateTags([
390 $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$locationStruct->contentId]),
391 $this->cacheIdentifierGenerator->generateTag(self::ROLE_ASSIGNMENT_GROUP_LIST_IDENTIFIER, [$locationStruct->contentId]),
392 ]);
393
394 return $location;
395 }
396
400 public function removeSubtree($locationId)
401 {
402 $this->logger->logCall(__METHOD__, ['location' => $locationId]);
403 $return = $this->persistenceHandler->locationHandler()->removeSubtree($locationId);
404
405 $this->cache->invalidateTags([
406 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$locationId]),
407 ]);
408
409 return $return;
410 }
411
415 public function setSectionForSubtree($locationId, $sectionId)
416 {
417 $this->logger->logCall(__METHOD__, ['location' => $locationId, 'section' => $sectionId]);
418 $this->persistenceHandler->locationHandler()->setSectionForSubtree($locationId, $sectionId);
419
420 $this->cache->invalidateTags([
421 $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$locationId]),
422 ]);
423 }
424
428 public function changeMainLocation($contentId, $locationId)
429 {
430 $this->logger->logCall(__METHOD__, ['location' => $locationId, 'content' => $contentId]);
431 $this->persistenceHandler->locationHandler()->changeMainLocation($contentId, $locationId);
432
433 $this->cache->invalidateTags([
434 $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$contentId]),
435 ]);
436 }
437
443 public function countAllLocations()
444 {
445 $this->logger->logCall(__METHOD__);
446
447 return $this->persistenceHandler->locationHandler()->countAllLocations();
448 }
449
458 public function loadAllLocations($offset, $limit)
459 {
460 $this->logger->logCall(__METHOD__, ['offset' => $offset, 'limit' => $limit]);
461
462 return $this->persistenceHandler->locationHandler()->loadAllLocations($offset, $limit);
463 }
464
472 private function getCacheTags(Location $location, $tags = [])
473 {
474 $tags[] = $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$location->contentId]);
475 $tags[] = $this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$location->id]);
476
477 $pathIds = $this->locationPathConverter->convertToPathIds($location->pathString);
478 foreach ($pathIds as $pathId) {
479 $tags[] = $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$pathId]);
480 }
481
482 return $tags;
483 }
484
485 private function getCacheTranslationKey(array $translations = null, bool $useAlwaysAvailable = true): string
486 {
487 if (empty($translations)) {
488 return (int)$useAlwaysAvailable;
489 }
490
491 // Sort array as we don't care about order in location handler usage & want to optimize for cache hits.
492 sort($translations);
493
494 return implode('|', $translations) . '|' . (int)$useAlwaysAvailable;
495 }
496 }
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Location
This is the base class for Location criterions.
Definition: API/Repository/Values/Content/Query/Criterion/Location.php:15
eZ\Publish\Core\Persistence\Cache\AbstractInMemoryHandler\getMultipleCacheValues
getMultipleCacheValues(array $ids, string $keyPrefix, callable $backendLoader, callable $cacheTagger, callable $cacheIndexes, string $keySuffix='', array $arguments=[])
Load several cache items from cache and loggs the hits / misses.
Definition: AbstractInMemoryHandler.php:195
eZ\Publish\Core\Persistence\Cache\AbstractInMemoryHandler\getCacheValue
getCacheValue( $id, string $keyPrefix, callable $backendLoader, callable $cacheTagger, callable $cacheIndexes, string $keySuffix='', array $arguments=[])
Load one cache item from cache and loggs the hits / misses.
Definition: AbstractInMemoryHandler.php:71
eZ\Publish\Core\Persistence\Cache\AbstractInMemoryPersistenceHandler
Internal abstract handler for use in other SPI Persistence Cache Handlers.
Definition: AbstractInMemoryPersistenceHandler.php:22
eZ\Publish\Core\Persistence\Cache\LocationHandler
Definition: LocationHandler.php:18
eZ\Publish\Core\Persistence\Cache\LocationHandler\CONTENT_LOCATIONS_IDENTIFIER
const CONTENT_LOCATIONS_IDENTIFIER
Definition: LocationHandler.php:24
eZ\Publish\Core\Persistence\Cache\LocationHandler\LOCATION_IDENTIFIER
const LOCATION_IDENTIFIER
Definition: LocationHandler.php:20
eZ\Publish\Core\Persistence\Cache\LocationHandler\create
create(CreateStruct $locationStruct)
{}
Definition: LocationHandler.php:382
eZ\Publish\Core\Persistence\Cache\LocationHandler\$getLocationKeys
$getLocationKeys
Definition: LocationHandler.php:33
eZ\Publish\Core\Persistence\Cache\LocationHandler\loadLocationsByContent
loadLocationsByContent($contentId, $rootLocationId=null)
{Loads all locations for $contentId, optionally limited to a sub tree identified by $rootLocationId....
Definition: LocationHandler.php:141
eZ\Publish\Core\Persistence\Cache\LocationHandler\hide
hide($locationId)
{Sets a location to be hidden, and it self + all children to invisible.Location ID}
Definition: LocationHandler.php:289
eZ\Publish\Core\Persistence\Cache\LocationHandler\changeMainLocation
changeMainLocation($contentId, $locationId)
{Changes main location of content identified by given $contentId to location identified by given $loc...
Definition: LocationHandler.php:428
eZ\Publish\Core\Persistence\Cache\LocationHandler\unHide
unHide($locationId)
{Sets a location to be unhidden, and self + children to visible unless a parent is hiding the tree....
Definition: LocationHandler.php:304
eZ\Publish\Core\Persistence\Cache\LocationHandler\LOCATION_PATH_IDENTIFIER
const LOCATION_PATH_IDENTIFIER
Definition: LocationHandler.php:21
eZ\Publish\Core\Persistence\Cache\LocationHandler\move
move($sourceId, $destinationParentId)
{Moves location identified by $sourceId into new parent identified by $destinationParentId....
Definition: LocationHandler.php:265
eZ\Publish\Core\Persistence\Cache\LocationHandler\loadAllLocations
loadAllLocations($offset, $limit)
Bulk-load all existing Locations, constrained by $limit and $offset to paginate results.
Definition: LocationHandler.php:458
eZ\Publish\Core\Persistence\Cache\LocationHandler\loadLocationsByTrashContent
loadLocationsByTrashContent(int $contentId, ?int $rootLocationId=null)
{Loads all locations for $contentId in trash, optionally limited to a sub tree identified by $rootLoc...
Definition: LocationHandler.php:183
eZ\Publish\Core\Persistence\Cache\LocationHandler\markSubtreeModified
markSubtreeModified($locationId, $timestamp=null)
{Marks the given nodes and all ancestors as modified.Optionally a time stamp with the modification da...
Definition: LocationHandler.php:280
eZ\Publish\Core\Persistence\Cache\LocationHandler\setSectionForSubtree
setSectionForSubtree($locationId, $sectionId)
{Set section on all content objects in the subtree.Only main locations will be updated....
Definition: LocationHandler.php:415
eZ\Publish\Core\Persistence\Cache\LocationHandler\setInvisible
setInvisible(int $id)
Sets a location + all children to invisible.
Definition: LocationHandler.php:321
eZ\Publish\Core\Persistence\Cache\LocationHandler\loadParentLocationsForDraftContent
loadParentLocationsForDraftContent($contentId)
{Loads all parent Locations for unpublished Content by given $contentId.\eZ\Publish\SPI\Persistence\C...
Definition: LocationHandler.php:193
eZ\Publish\Core\Persistence\Cache\LocationHandler\CONTENT_LOCATIONS_WITH_PARENT_FOR_DRAFT_SUFFIX_IDENTIFIER
const CONTENT_LOCATIONS_WITH_PARENT_FOR_DRAFT_SUFFIX_IDENTIFIER
Definition: LocationHandler.php:25
eZ\Publish\Core\Persistence\Cache\LocationHandler\getCacheTags
getCacheTags(Location $location, $tags=[])
Return relevant content and location tags so cache can be purged reliably.
Definition: LocationHandler.php:472
eZ\Publish\Core\Persistence\Cache\LocationHandler\copySubtree
copySubtree($sourceId, $destinationParentId, $newOwnerId=null)
{}
Definition: LocationHandler.php:251
eZ\Publish\Core\Persistence\Cache\LocationHandler\ROLE_ASSIGNMENT_GROUP_LIST_IDENTIFIER
const ROLE_ASSIGNMENT_GROUP_LIST_IDENTIFIER
Definition: LocationHandler.php:27
eZ\Publish\Core\Persistence\Cache\LocationHandler\removeSubtree
removeSubtree($locationId)
{Removes all Locations under and including $locationId.Performs a recursive delete on the location id...
Definition: LocationHandler.php:400
eZ\Publish\Core\Persistence\Cache\LocationHandler\LOCATION_SUBTREE_IDENTIFIER
const LOCATION_SUBTREE_IDENTIFIER
Definition: LocationHandler.php:23
eZ\Publish\Core\Persistence\Cache\LocationHandler\LOCATION_REMOTE_ID_IDENTIFIER
const LOCATION_REMOTE_ID_IDENTIFIER
Definition: LocationHandler.php:22
eZ\Publish\Core\Persistence\Cache\LocationHandler\setVisible
setVisible(int $id)
Sets a location + all children to visible.
Definition: LocationHandler.php:336
eZ\Publish\Core\Persistence\Cache\LocationHandler\update
update(UpdateStruct $struct, $locationId)
{Updates an existing location.}
Definition: LocationHandler.php:369
eZ\Publish\Core\Persistence\Cache\LocationHandler\loadList
loadList(array $locationIds, array $translations=null, bool $useAlwaysAvailable=true)
Return list of unique Locations, with location id as key.
Definition: LocationHandler.php:86
eZ\Publish\Core\Persistence\Cache\LocationHandler\getCacheTranslationKey
getCacheTranslationKey(array $translations=null, bool $useAlwaysAvailable=true)
Definition: LocationHandler.php:485
eZ\Publish\Core\Persistence\Cache\LocationHandler\load
load($locationId, array $translations=null, bool $useAlwaysAvailable=true)
{Loads the data for the location identified by $locationId.If set, NotFound is thrown if content is n...
Definition: LocationHandler.php:66
eZ\Publish\Core\Persistence\Cache\LocationHandler\loadSubtreeIds
loadSubtreeIds($locationId)
{Loads the subtree ids of the location identified by $locationId.}
Definition: LocationHandler.php:109
eZ\Publish\Core\Persistence\Cache\LocationHandler\$getLocationTags
$getLocationTags
Definition: LocationHandler.php:30
eZ\Publish\Core\Persistence\Cache\LocationHandler\PARENT_FOR_DRAFT_SUFFIX
const PARENT_FOR_DRAFT_SUFFIX
Definition: LocationHandler.php:26
eZ\Publish\Core\Persistence\Cache\LocationHandler\loadByRemoteId
loadByRemoteId($remoteId, array $translations=null, bool $useAlwaysAvailable=true)
{Loads the data for the location identified by $remoteId.If set, NotFound is thrown if content is not...
Definition: LocationHandler.php:228
eZ\Publish\Core\Persistence\Cache\LocationHandler\CONTENT_IDENTIFIER
const CONTENT_IDENTIFIER
Definition: LocationHandler.php:19
eZ\Publish\Core\Persistence\Cache\LocationHandler\init
init()
Optional function to initialize handler without having to overload __construct().
Definition: LocationHandler.php:35
eZ\Publish\Core\Persistence\Cache\LocationHandler\swap
swap($locationId1, $locationId2)
{Swaps the content object being pointed to by a location object.Make the location identified by $loca...
Definition: LocationHandler.php:349
eZ\Publish\Core\Persistence\Cache\LocationHandler\countAllLocations
countAllLocations()
Get the total number of all existing Locations.
Definition: LocationHandler.php:443
eZ\Publish\SPI\Persistence\Bookmark\CreateStruct
Definition: SPI/Persistence/Bookmark/CreateStruct.php:14
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\Handler
The Location Handler interface defines operations on Location elements in the storage engine.
Definition: SPI/Persistence/Content/Location/Handler.php:15
eZ\Publish\Core\Persistence\Cache
Definition: AbstractHandler.php:7
eZ\Publish\SPI\Persistence\Content\Location
Definition: SPI/Persistence/Content/Location/CreateStruct.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.