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

Persistence/Legacy/Content/Gateway/ExceptionConversion.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Persistence\Legacy\Content\Gateway;
8
9 use eZ\Publish\Core\Base\Exceptions\DatabaseException;
10 use eZ\Publish\Core\Persistence\Legacy\Content\Gateway;
11 use eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue;
12 use eZ\Publish\SPI\Persistence\Content;
13 use eZ\Publish\SPI\Persistence\Content\CreateStruct;
14 use eZ\Publish\SPI\Persistence\Content\UpdateStruct;
15 use eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct;
16 use eZ\Publish\SPI\Persistence\Content\VersionInfo;
17 use eZ\Publish\SPI\Persistence\Content\Field;
18 use eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct as RelationCreateStruct;
19 use Doctrine\DBAL\DBALException;
20 use PDOException;
21
25 class ExceptionConversion extends Gateway
26 {
32 protected $innerGateway;
33
39 public function __construct(Gateway $innerGateway)
40 {
41 $this->innerGateway = $innerGateway;
42 }
43
49 public function getContext()
50 {
51 try {
52 return $this->innerGateway->getContext();
53 } catch (DBALException | PDOException $e) {
54 throw DatabaseException::wrap($e);
55 }
56 }
57
66 public function insertContentObject(CreateStruct $struct, $currentVersionNo = 1)
67 {
68 try {
69 return $this->innerGateway->insertContentObject($struct, $currentVersionNo);
70 } catch (DBALException | PDOException $e) {
71 throw DatabaseException::wrap($e);
72 }
73 }
74
83 public function insertVersion(VersionInfo $versionInfo, array $fields)
84 {
85 try {
86 return $this->innerGateway->insertVersion($versionInfo, $fields);
87 } catch (DBALException | PDOException $e) {
88 throw DatabaseException::wrap($e);
89 }
90 }
91
99 public function updateContent($contentId, MetadataUpdateStruct $struct, VersionInfo $prePublishVersionInfo = null)
100 {
101 try {
102 return $this->innerGateway->updateContent($contentId, $struct, $prePublishVersionInfo);
103 } catch (DBALException | PDOException $e) {
104 throw DatabaseException::wrap($e);
105 }
106 }
107
115 public function updateVersion($contentId, $versionNo, UpdateStruct $struct)
116 {
117 try {
118 return $this->innerGateway->updateVersion($contentId, $versionNo, $struct);
119 } catch (DBALException | PDOException $e) {
120 throw DatabaseException::wrap($e);
121 }
122 }
123
130 public function updateAlwaysAvailableFlag($contentId, $newAlwaysAvailable)
131 {
132 try {
133 return $this->innerGateway->updateAlwaysAvailableFlag($contentId, $newAlwaysAvailable);
134 } catch (DBALException | PDOException $e) {
135 throw DatabaseException::wrap($e);
136 }
137 }
138
150 public function setStatus($contentId, $version, $status)
151 {
152 try {
153 return $this->innerGateway->setStatus($contentId, $version, $status);
154 } catch (DBALException | PDOException $e) {
155 throw DatabaseException::wrap($e);
156 }
157 }
158
159 public function setPublishedStatus(int $contentId, int $status): void
160 {
161 try {
162 $this->innerGateway->setPublishedStatus($contentId, $status);
163 } catch (DBALException | PDOException $e) {
164 throw DatabaseException::wrap($e);
165 }
166 }
167
181 public function insertNewField(Content $content, Field $field, StorageFieldValue $value)
182 {
183 try {
184 return $this->innerGateway->insertNewField($content, $field, $value);
185 } catch (DBALException | PDOException $e) {
186 throw DatabaseException::wrap($e);
187 }
188 }
189
199 public function insertExistingField(Content $content, Field $field, StorageFieldValue $value)
200 {
201 try {
202 return $this->innerGateway->insertExistingField($content, $field, $value);
203 } catch (DBALException | PDOException $e) {
204 throw DatabaseException::wrap($e);
205 }
206 }
207
214 public function updateField(Field $field, StorageFieldValue $value)
215 {
216 try {
217 return $this->innerGateway->updateField($field, $value);
218 } catch (DBALException | PDOException $e) {
219 throw DatabaseException::wrap($e);
220 }
221 }
222
230 public function updateNonTranslatableField(
231 Field $field,
232 StorageFieldValue $value,
233 $contentId
234 ) {
235 try {
236 return $this->innerGateway->updateNonTranslatableField($field, $value, $contentId);
237 } catch (DBALException | PDOException $e) {
238 throw DatabaseException::wrap($e);
239 }
240 }
241
245 public function load($contentId, $version = null, array $translations = null)
246 {
247 try {
248 return $this->innerGateway->load($contentId, $version, $translations);
249 } catch (DBALException | PDOException $e) {
250 throw DatabaseException::wrap($e);
251 }
252 }
253
257 public function loadContentList(array $contentIds, array $translations = null): array
258 {
259 try {
260 return $this->innerGateway->loadContentList($contentIds, $translations);
261 } catch (DBALException | PDOException $e) {
262 throw DatabaseException::wrap($e);
263 }
264 }
265
275 public function loadContentInfoByRemoteId($remoteId)
276 {
277 try {
278 return $this->innerGateway->loadContentInfoByRemoteId($remoteId);
279 } catch (DBALException | PDOException $e) {
280 throw DatabaseException::wrap($e);
281 }
282 }
283
295 public function loadContentInfoByLocationId($locationId)
296 {
297 try {
298 return $this->innerGateway->loadContentInfoByLocationId($locationId);
299 } catch (DBALException | PDOException $e) {
300 throw DatabaseException::wrap($e);
301 }
302 }
303
316 public function loadContentInfo($contentId)
317 {
318 try {
319 return $this->innerGateway->loadContentInfo($contentId);
320 } catch (DBALException | PDOException $e) {
321 throw DatabaseException::wrap($e);
322 }
323 }
324
325 public function loadContentInfoList(array $contentIds)
326 {
327 try {
328 return $this->innerGateway->loadContentInfoList($contentIds);
329 } catch (DBALException | PDOException $e) {
330 throw DatabaseException::wrap($e);
331 }
332 }
333
346 public function loadVersionInfo($contentId, $versionNo = null)
347 {
348 try {
349 return $this->innerGateway->loadVersionInfo($contentId, $versionNo);
350 } catch (DBALException | PDOException $e) {
351 throw DatabaseException::wrap($e);
352 }
353 }
354
363 public function countVersionsForUser(int $userId, int $status = VersionInfo::STATUS_DRAFT): int
364 {
365 try {
366 return $this->innerGateway->countVersionsForUser($userId, $status);
367 } catch (DBALException | PDOException $e) {
368 throw DatabaseException::wrap($e);
369 }
370 }
371
380 public function listVersionsForUser($userId, $status = VersionInfo::STATUS_DRAFT, int $offset = 0, int $limit = -1)
381 {
382 try {
383 return $this->innerGateway->listVersionsForUser($userId, $status, $offset, $limit);
384 } catch (DBALException | PDOException $e) {
385 throw DatabaseException::wrap($e);
386 }
387 }
388
392 public function loadVersionsForUser($userId, $status = VersionInfo::STATUS_DRAFT, int $offset = 0, int $limit = -1): array
393 {
394 try {
395 return $this->innerGateway->loadVersionsForUser($userId, $status, $offset, $limit);
396 } catch (DBALException | PDOException $e) {
397 throw DatabaseException::wrap($e);
398 }
399 }
400
412 public function listVersions($contentId, $status = null, $limit = -1)
413 {
414 try {
415 return $this->innerGateway->listVersions($contentId, $status, $limit);
416 } catch (DBALException | PDOException $e) {
417 throw DatabaseException::wrap($e);
418 }
419 }
420
428 public function listVersionNumbers($contentId)
429 {
430 try {
431 return $this->innerGateway->listVersionNumbers($contentId);
432 } catch (DBALException | PDOException $e) {
433 throw DatabaseException::wrap($e);
434 }
435 }
436
444 public function getLastVersionNumber($contentId)
445 {
446 try {
447 return $this->innerGateway->getLastVersionNumber($contentId);
448 } catch (DBALException | PDOException $e) {
449 throw DatabaseException::wrap($e);
450 }
451 }
452
460 public function getAllLocationIds($contentId)
461 {
462 try {
463 return $this->innerGateway->getAllLocationIds($contentId);
464 } catch (DBALException | PDOException $e) {
465 throw DatabaseException::wrap($e);
466 }
467 }
468
480 public function getFieldIdsByType($contentId, $versionNo = null, $languageCode = null)
481 {
482 try {
483 return $this->innerGateway->getFieldIdsByType($contentId, $versionNo, $languageCode);
484 } catch (DBALException | PDOException $e) {
485 throw DatabaseException::wrap($e);
486 }
487 }
488
496 public function deleteRelations($contentId, $versionNo = null)
497 {
498 try {
499 return $this->innerGateway->deleteRelations($contentId, $versionNo);
500 } catch (DBALException | PDOException $e) {
501 throw DatabaseException::wrap($e);
502 }
503 }
504
510 public function removeReverseFieldRelations($contentId)
511 {
512 try {
513 return $this->innerGateway->removeReverseFieldRelations($contentId);
514 } catch (DBALException | PDOException $e) {
515 throw DatabaseException::wrap($e);
516 }
517 }
518
519 public function removeRelationsByFieldDefinitionId(int $fieldDefinitionId)
520 {
521 try {
522 return $this->innerGateway->removeRelationsByFieldDefinitionId($fieldDefinitionId);
523 } catch (DBALException | PDOException $e) {
524 throw DatabaseException::wrap($e);
525 }
526 }
527
533 public function deleteField($fieldId)
534 {
535 try {
536 return $this->innerGateway->deleteField($fieldId);
537 } catch (DBALException | PDOException $e) {
538 throw DatabaseException::wrap($e);
539 }
540 }
541
549 public function deleteFields($contentId, $versionNo = null)
550 {
551 try {
552 return $this->innerGateway->deleteFields($contentId, $versionNo);
553 } catch (DBALException | PDOException $e) {
554 throw DatabaseException::wrap($e);
555 }
556 }
557
565 public function deleteVersions($contentId, $versionNo = null)
566 {
567 try {
568 return $this->innerGateway->deleteVersions($contentId, $versionNo);
569 } catch (DBALException | PDOException $e) {
570 throw DatabaseException::wrap($e);
571 }
572 }
573
581 public function deleteNames($contentId, $versionNo = null)
582 {
583 try {
584 return $this->innerGateway->deleteNames($contentId, $versionNo);
585 } catch (DBALException | PDOException $e) {
586 throw DatabaseException::wrap($e);
587 }
588 }
589
598 public function setName($contentId, $version, $name, $language)
599 {
600 try {
601 return $this->innerGateway->setName($contentId, $version, $name, $language);
602 } catch (DBALException | PDOException $e) {
603 throw DatabaseException::wrap($e);
604 }
605 }
606
612 public function deleteContent($contentId)
613 {
614 try {
615 return $this->innerGateway->deleteContent($contentId);
616 } catch (DBALException | PDOException $e) {
617 throw DatabaseException::wrap($e);
618 }
619 }
620
630 public function loadRelations($contentId, $contentVersionNo = null, $relationType = null)
631 {
632 try {
633 return $this->innerGateway->loadRelations($contentId, $contentVersionNo, $relationType);
634 } catch (DBALException | PDOException $e) {
635 throw DatabaseException::wrap($e);
636 }
637 }
638
642 public function countReverseRelations(int $contentId, ?int $relationType = null): int
643 {
644 try {
645 return $this->innerGateway->countReverseRelations($contentId, $relationType);
646 } catch (DBALException | PDOException $e) {
647 throw DatabaseException::wrap($e);
648 }
649 }
650
659 public function loadReverseRelations($contentId, $relationType = null)
660 {
661 try {
662 return $this->innerGateway->loadReverseRelations($contentId, $relationType);
663 } catch (DBALException | PDOException $e) {
664 throw DatabaseException::wrap($e);
665 }
666 }
667
671 public function listReverseRelations(int $contentId, int $offset = 0, int $limit = -1, ?int $relationType = null): array
672 {
673 try {
674 return $this->innerGateway->listReverseRelations($contentId, $offset, $limit, $relationType);
675 } catch (DBALException | PDOException $e) {
676 throw new RuntimeException('Database error', 0, $e);
677 }
678 }
679
689 public function deleteRelation($relationId, $type)
690 {
691 try {
692 return $this->innerGateway->deleteRelation($relationId, $type);
693 } catch (DBALException | PDOException $e) {
694 throw DatabaseException::wrap($e);
695 }
696 }
697
705 public function insertRelation(RelationCreateStruct $struct)
706 {
707 try {
708 return $this->innerGateway->insertRelation($struct);
709 } catch (DBALException | PDOException $e) {
710 throw DatabaseException::wrap($e);
711 }
712 }
713
721 public function getContentIdsByContentTypeId($contentTypeId)
722 {
723 try {
724 return $this->innerGateway->getContentIdsByContentTypeId($contentTypeId);
725 } catch (DBALException | PDOException $e) {
726 throw DatabaseException::wrap($e);
727 }
728 }
729
737 public function loadVersionedNameData($rows)
738 {
739 try {
740 return $this->innerGateway->loadVersionedNameData($rows);
741 } catch (DBALException | PDOException $e) {
742 throw DatabaseException::wrap($e);
743 }
744 }
745
755 public function copyRelations($originalContentId, $copiedContentId, $versionNo = null)
756 {
757 try {
758 return $this->innerGateway->copyRelations($originalContentId, $copiedContentId, $versionNo);
759 } catch (DBALException | PDOException $e) {
760 throw DatabaseException::wrap($e);
761 }
762 }
763
770 public function deleteTranslationFromContent($contentId, $languageCode)
771 {
772 try {
773 return $this->innerGateway->deleteTranslationFromContent($contentId, $languageCode);
774 } catch (DBALException | PDOException $e) {
775 throw DatabaseException::wrap($e);
776 }
777 }
778
787 public function deleteTranslatedFields($languageCode, $contentId, $versionNo = null)
788 {
789 try {
790 return $this->innerGateway->deleteTranslatedFields($languageCode, $contentId, $versionNo);
791 } catch (DBALException | PDOException $e) {
792 throw DatabaseException::wrap($e);
793 }
794 }
795
803 public function deleteTranslationFromVersion($contentId, $versionNo, $languageCode)
804 {
805 try {
806 return $this->innerGateway->deleteTranslationFromVersion($contentId, $versionNo, $languageCode);
807 } catch (DBALException | PDOException $e) {
808 throw DatabaseException::wrap($e);
809 }
810 }
811 }
eZ\Publish\Core\Base\Exceptions\DatabaseException
An exception that is thrown when the database encounters an error.
Definition: DatabaseException.php:18
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion
Base class for content gateways.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:26
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\removeRelationsByFieldDefinitionId
removeRelationsByFieldDefinitionId(int $fieldDefinitionId)
Removes orphaned relations resulting from deleted relation fieldtype.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:519
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\updateVersion
updateVersion($contentId, $versionNo, UpdateStruct $struct)
Updates version $versionNo for content identified by $contentId, in respect to $struct.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:115
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\updateAlwaysAvailableFlag
updateAlwaysAvailableFlag($contentId, $newAlwaysAvailable)
Updates "always available" flag for content identified by $contentId, in respect to $alwaysAvailable.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:130
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\updateField
updateField(Field $field, StorageFieldValue $value)
Updates an existing field.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:214
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\setStatus
setStatus($contentId, $version, $status)
Sets the state of object identified by $contentId and $version to $state.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:150
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\copyRelations
copyRelations($originalContentId, $copiedContentId, $versionNo=null)
Batch method for copying all relation meta data for copied Content object.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:755
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\getAllLocationIds
getAllLocationIds($contentId)
Returns all IDs for locations that refer to $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:460
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\getLastVersionNumber
getLastVersionNumber($contentId)
Returns last version number for content identified by $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:444
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteField
deleteField($fieldId)
Deletes the field with the given $fieldId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:533
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\insertNewField
insertNewField(Content $content, Field $field, StorageFieldValue $value)
Inserts a new field.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:181
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\insertRelation
insertRelation(RelationCreateStruct $struct)
Inserts a new relation database record.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:705
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\load
load($contentId, $version=null, array $translations=null)
{Loads data for a content object.Returns an array with the relevant data.Current version on null valu...
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:245
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadContentInfoByLocationId
loadContentInfoByLocationId($locationId)
Loads info for a content object identified by its location ID (node ID).
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:295
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\updateContent
updateContent($contentId, MetadataUpdateStruct $struct, VersionInfo $prePublishVersionInfo=null)
Updates an existing content identified by $contentId in respect to $struct.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:99
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\removeReverseFieldRelations
removeReverseFieldRelations($contentId)
Removes relations to Content with $contentId from Relation and RelationList field type fields.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:510
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteTranslatedFields
deleteTranslatedFields($languageCode, $contentId, $versionNo=null)
Delete Content fields (attributes) for the given Translation.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:787
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadRelations
loadRelations($contentId, $contentVersionNo=null, $relationType=null)
Loads data of related to/from $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:630
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\getFieldIdsByType
getFieldIdsByType($contentId, $versionNo=null, $languageCode=null)
Returns all field IDs of $contentId grouped by their type.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:480
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\insertContentObject
insertContentObject(CreateStruct $struct, $currentVersionNo=1)
Inserts a new content object.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:66
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteRelation
deleteRelation($relationId, $type)
Deletes the relation with the given $relationId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:689
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteTranslationFromVersion
deleteTranslationFromVersion($contentId, $versionNo, $languageCode)
Delete the specified Translation from the given Version.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:803
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\listVersions
listVersions($contentId, $status=null, $limit=-1)
Returns all version data for the given $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:412
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteContent
deleteContent($contentId)
Deletes the actual content object referred to by $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:612
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\$innerGateway
$innerGateway
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:32
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteFields
deleteFields($contentId, $versionNo=null)
Deletes all fields of $contentId in all versions.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:549
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\setName
setName($contentId, $version, $name, $language)
Sets the content object name.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:598
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteRelations
deleteRelations($contentId, $versionNo=null)
Deletes relations to and from $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:496
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteNames
deleteNames($contentId, $versionNo=null)
Deletes all names of $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:581
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\listVersionsForUser
listVersionsForUser($userId, $status=VersionInfo::STATUS_DRAFT, int $offset=0, int $limit=-1)
Returns data for all versions with given status created by the given $userId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:380
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\listVersionNumbers
listVersionNumbers($contentId)
Returns all version numbers for the given $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:428
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadContentInfoList
loadContentInfoList(array $contentIds)
Loads rows of info for content identified by $contentIds.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:325
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\insertExistingField
insertExistingField(Content $content, Field $field, StorageFieldValue $value)
Inserts an existing field.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:199
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadVersionsForUser
loadVersionsForUser($userId, $status=VersionInfo::STATUS_DRAFT, int $offset=0, int $limit=-1)
{Returns data for all versions with given status created by the given $userId when content is not in ...
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:392
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadReverseRelations
loadReverseRelations($contentId, $relationType=null)
Loads data of related to/from $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:659
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadContentList
loadContentList(array $contentIds, array $translations=null)
{Loads current version for a list of content objects.If languages is not set, ALL will be loaded....
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:257
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\listReverseRelations
listReverseRelations(int $contentId, int $offset=0, int $limit=-1, ?int $relationType=null)
{Loads paginated data of related to/from $contentId.array}
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:671
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\__construct
__construct(Gateway $innerGateway)
Creates a new exception conversion gateway around $innerGateway.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:39
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\setPublishedStatus
setPublishedStatus(int $contentId, int $status)
Dedicated operation which sets Version status as published, similar to setStatus, but checking state ...
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:159
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\updateNonTranslatableField
updateNonTranslatableField(Field $field, StorageFieldValue $value, $contentId)
Updates an existing, non-translatable field.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:230
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadVersionedNameData
loadVersionedNameData($rows)
Load name data for set of content id's and corresponding version number.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:737
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadContentInfoByRemoteId
loadContentInfoByRemoteId($remoteId)
Loads data for a content object identified by its remote ID.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:275
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadContentInfo
loadContentInfo($contentId)
Loads info for content identified by $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:316
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\insertVersion
insertVersion(VersionInfo $versionInfo, array $fields)
Inserts a new version.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:83
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteTranslationFromContent
deleteTranslationFromContent($contentId, $languageCode)
Remove the specified translation from all the Versions of a Content Object.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:770
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\getContext
getContext()
Get context definition for external storage layers.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:49
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\deleteVersions
deleteVersions($contentId, $versionNo=null)
Deletes all versions of $contentId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:565
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\countVersionsForUser
countVersionsForUser(int $userId, int $status=VersionInfo::STATUS_DRAFT)
Returns the number of all versions with given status created by the given $userId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:363
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\loadVersionInfo
loadVersionInfo($contentId, $versionNo=null)
Loads version info for content identified by $contentId and $versionNo.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:346
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\getContentIdsByContentTypeId
getContentIdsByContentTypeId($contentTypeId)
Returns all Content IDs for a given $contentTypeId.
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:721
eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion\countReverseRelations
countReverseRelations(int $contentId, ?int $relationType=null)
{Counts number of related to/from $contentId.int}
Definition: Persistence/Legacy/Content/Gateway/ExceptionConversion.php:642
eZ\Publish\Core\Persistence\Legacy\Content\Gateway
Base class for content gateways.
Definition: Persistence/Legacy/Content/Gateway.php:21
eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue
Definition: StorageFieldValue.php:12
eZ\Publish\SPI\Persistence\Content\CreateStruct
Definition: SPI/Persistence/Content/CreateStruct.php:12
eZ\Publish\SPI\Persistence\Content\Field
Definition: SPI/Persistence/Content/Field.php:12
eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct
Definition: MetadataUpdateStruct.php:12
eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct
CreateStruct representing a relation between content.
Definition: SPI/Persistence/Content/Relation/CreateStruct.php:15
eZ\Publish\SPI\Persistence\Content\UpdateStruct
Definition: Content/UpdateStruct.php:12
eZ\Publish\SPI\Persistence\Content\VersionInfo
This class holds version information data.
Definition: SPI/Persistence/Content/VersionInfo.php:15
eZ\Publish\SPI\Persistence\Content\VersionInfo\STATUS_DRAFT
const STATUS_DRAFT
Definition: SPI/Persistence/Content/VersionInfo.php:21
eZ\Publish\SPI\Persistence\Content
Content value object, bound to a version.
Definition: Publish/SPI/Persistence/Content.php:17
eZ\Publish\SPI\Persistence\Content
Definition: SPI/Persistence/Content/ContentInfo.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.