‪TYPO3CMS  10.4
Backend.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
18 use Psr\EventDispatcher\EventDispatcherInterface;
44 
51 {
55  protected ‪$session;
56 
60  protected ‪$persistenceManager;
61 
65  protected ‪$aggregateRootObjects;
66 
71 
75  protected ‪$changedEntities;
76 
81 
85  protected ‪$reflectionService;
86 
90  protected ‪$qomFactory;
91 
95  protected ‪$storageBackend;
96 
101 
107  protected ‪$referenceIndex;
108 
112  protected ‪$configurationManager;
113 
117  protected ‪$signalSlotDispatcher;
118 
122  protected ‪$eventDispatcher;
123 
135  public function ‪__construct(
140  \‪TYPO3\CMS\‪Extbase\Persistence\Generic\Storage\‪BackendInterface ‪$storageBackend,
142  EventDispatcherInterface ‪$eventDispatcher
143  ) {
144  $this->configurationManager = ‪$configurationManager;
145  $this->session = ‪$session;
146  $this->reflectionService = ‪$reflectionService;
147  $this->qomFactory = ‪$qomFactory;
148  $this->storageBackend = ‪$storageBackend;
149  $this->dataMapFactory = ‪$dataMapFactory;
150  $this->eventDispatcher = ‪$eventDispatcher;
151 
152  $this->referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class);
153  $this->referenceIndex->enableRuntimeCache();
154  $this->aggregateRootObjects = new ‪ObjectStorage();
155  $this->deletedEntities = new ‪ObjectStorage();
156  $this->changedEntities = new ‪ObjectStorage();
157  }
158 
163  {
164  $this->persistenceManager = ‪$persistenceManager;
165  }
166 
172  public function ‪getSession()
173  {
174  return ‪$this->session;
175  }
176 
182  public function ‪getQomFactory()
183  {
184  return ‪$this->qomFactory;
185  }
186 
192  public function ‪getReflectionService()
193  {
195  }
196 
203  public function ‪getObjectCountByQuery(QueryInterface $query)
204  {
205  return $this->storageBackend->getObjectCountByQuery($query);
206  }
207 
214  public function ‪getObjectDataByQuery(QueryInterface $query)
215  {
216  $event = new ModifyQueryBeforeFetchingObjectDataEvent($query);
217  $this->eventDispatcher->dispatch($event);
218  $query = $event->getQuery();
219  $result = $this->storageBackend->getObjectDataByQuery($query);
220  $event = new ‪ModifyResultAfterFetchingObjectDataEvent($query, $result);
221  $this->eventDispatcher->dispatch($event);
222  return $event->getResult();
223  }
224 
232  public function ‪getIdentifierByObject($object)
233  {
234  if ($object instanceof ‪LazyLoadingProxy) {
235  $object = $object->_loadRealInstance();
236  if (!is_object($object)) {
237  return null;
238  }
239  }
240  return $this->session->getIdentifierByObject($object);
241  }
242 
251  public function ‪getObjectByIdentifier($identifier, $className)
252  {
253  if ($this->session->hasIdentifier($identifier, $className)) {
254  return $this->session->getObjectByIdentifier($identifier, $className);
255  }
256  $query = $this->persistenceManager->createQueryForType($className);
257  $query->getQuerySettings()->setRespectStoragePage(false);
258  $query->getQuerySettings()->setRespectSysLanguage(false);
259  $query->getQuerySettings()->setLanguageOverlayMode(true);
260  return $query->matching($query->equals('uid', $identifier))->execute()->getFirst();
261  }
262 
269  public function ‪isNewObject($object)
270  {
271  return $this->‪getIdentifierByObject($object) === null;
272  }
273 
279  public function ‪setAggregateRootObjects(ObjectStorage $objects)
280  {
281  $this->aggregateRootObjects = $objects;
282  }
283 
289  public function ‪setChangedEntities(ObjectStorage $entities)
290  {
291  $this->changedEntities = $entities;
292  }
293 
299  public function ‪setDeletedEntities(‪ObjectStorage $entities)
300  {
301  $this->deletedEntities = $entities;
302  }
303 
307  public function ‪commit()
308  {
309  $this->‪persistObjects();
310  $this->‪processDeletedObjects();
311  }
312 
316  protected function ‪persistObjects()
317  {
318  $this->visitedDuringPersistence = new ‪ObjectStorage();
319  foreach ($this->aggregateRootObjects as $object) {
321  if ($object->_isNew()) {
322  $this->‪insertObject($object);
323  }
324  $this->‪persistObject($object);
325  }
326  foreach ($this->changedEntities as $object) {
327  $this->‪persistObject($object);
328  }
329  }
330 
336  protected function ‪persistObject(DomainObjectInterface $object)
337  {
338  if (isset($this->visitedDuringPersistence[$object])) {
339  return;
340  }
341  $row = [];
342  $queue = [];
343  $dataMap = $this->dataMapFactory->buildDataMap(get_class($object));
344  $properties = $object->_getProperties();
345  foreach ($properties as $propertyName => $propertyValue) {
346  if (!$dataMap->isPersistableProperty($propertyName) || $this->propertyValueIsLazyLoaded($propertyValue)) {
347  continue;
348  }
349  $columnMap = $dataMap->getColumnMap($propertyName);
350  if ($propertyValue instanceof ObjectStorage) {
351  $cleanProperty = $object->_getCleanProperty($propertyName);
352  // objectstorage needs to be persisted if the object is new, the objectstorage is dirty, meaning it has
353  // been changed after initial build, or an empty objectstorage is present and the cleanstate objectstorage
354  // has childelements, meaning all elements should been removed from the objectstorage
355  if ($object->_isNew() || $propertyValue->_isDirty() || ($propertyValue->count() === 0 && $cleanProperty && $cleanProperty->count() > 0)) {
356  $this->‪persistObjectStorage($propertyValue, $object, $propertyName, $row);
357  $propertyValue->_memorizeCleanState();
358  }
359  foreach ($propertyValue as $containedObject) {
360  if ($containedObject instanceof DomainObjectInterface) {
361  $queue[] = $containedObject;
362  }
363  }
364  } elseif ($propertyValue instanceof DomainObjectInterface
365  && $object instanceof ObjectMonitoringInterface) {
366  if ($object->_isDirty($propertyName)) {
367  if ($propertyValue->_isNew()) {
368  $this->‪insertObject($propertyValue, $object, $propertyName);
369  }
370  $row[$columnMap->getColumnName()] = $this->‪getPlainValue($propertyValue);
371  }
372  $queue[] = $propertyValue;
373  } elseif ($object->_isNew() || $object->_isDirty($propertyName)) {
374  $row[$columnMap->getColumnName()] = $this->‪getPlainValue($propertyValue, $columnMap);
375  }
376  }
377  if (!empty($row)) {
378  $this->‪updateObject($object, $row);
379  $object->_memorizeCleanState();
380  }
381  $this->visitedDuringPersistence[$object] = $object->getUid();
382  foreach ($queue as $queuedObject) {
383  $this->‪persistObject($queuedObject);
384  }
385  $this->eventDispatcher->dispatch(new EntityPersistedEvent($object));
386  }
387 
394  protected function ‪propertyValueIsLazyLoaded($propertyValue)
395  {
396  if ($propertyValue instanceof LazyLoadingProxy) {
397  return true;
398  }
399  if ($propertyValue instanceof LazyObjectStorage) {
400  if ($propertyValue->isInitialized() === false) {
401  return true;
402  }
403  }
404  return false;
405  }
406 
418  protected function ‪persistObjectStorage(‪ObjectStorage $objectStorage, ‪DomainObjectInterface $parentObject, $propertyName, array &$row)
419  {
420  $className = get_class($parentObject);
421  $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
422  $dataMapper = $objectManager->get(DataMapper::class);
423  $columnMap = $this->dataMapFactory->buildDataMap($className)->getColumnMap($propertyName);
424  $property = $this->reflectionService->getClassSchema($className)->getProperty($propertyName);
425  foreach ($this->‪getRemovedChildObjects($parentObject, $propertyName) as $removedObject) {
426  $this->‪detachObjectFromParentObject($removedObject, $parentObject, $propertyName);
427  if ($columnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_MANY && $property->getCascadeValue() === 'remove') {
428  $this->‪removeEntity($removedObject);
429  }
430  }
431 
432  $currentUids = [];
433  $sortingPosition = 1;
434  $updateSortingOfFollowing = false;
435 
436  foreach ($objectStorage as $object) {
438  if (empty($currentUids)) {
439  $sortingPosition = 1;
440  } else {
441  $sortingPosition++;
442  }
443  $cleanProperty = $parentObject->‪_getCleanProperty($propertyName);
444  if ($object->_isNew()) {
445  $this->‪insertObject($object);
446  $this->‪attachObjectToParentObject($object, $parentObject, $propertyName, $sortingPosition);
447  // if a new object is inserted, all objects after this need to have their sorting updated
448  $updateSortingOfFollowing = true;
449  } elseif ($cleanProperty === null || $cleanProperty->getPosition($object) === null) {
450  // if parent object is new then it doesn't have cleanProperty yet; before attaching object it's clean position is null
451  $this->‪attachObjectToParentObject($object, $parentObject, $propertyName, $sortingPosition);
452  // if a relation is dirty (speaking the same object is removed and added again at a different position), all objects after this needs to be updated the sorting
453  $updateSortingOfFollowing = true;
454  } elseif ($objectStorage->‪isRelationDirty($object) || $cleanProperty->getPosition($object) !== $objectStorage->‪getPosition($object)) {
455  $this->‪updateRelationOfObjectToParentObject($object, $parentObject, $propertyName, $sortingPosition);
456  $updateSortingOfFollowing = true;
457  } elseif ($updateSortingOfFollowing) {
458  if ($sortingPosition > $objectStorage->‪getPosition($object)) {
459  $this->‪updateRelationOfObjectToParentObject($object, $parentObject, $propertyName, $sortingPosition);
460  } else {
461  $sortingPosition = $objectStorage->‪getPosition($object);
462  }
463  }
464  $currentUids[] = $object->getUid();
465  }
466 
467  if ($columnMap->getParentKeyFieldName() === null) {
468  $row[$columnMap->getColumnName()] = implode(',', $currentUids);
469  } else {
470  $row[$columnMap->getColumnName()] = $dataMapper->countRelated($parentObject, $propertyName);
471  }
472  }
473 
482  protected function ‪getRemovedChildObjects(DomainObjectInterface $object, $propertyName)
483  {
484  $removedObjects = [];
485  $cleanPropertyValue = $object->_getCleanProperty($propertyName);
486  if (is_array($cleanPropertyValue) || $cleanPropertyValue instanceof \Iterator) {
487  $propertyValue = $object->_getProperty($propertyName);
488  foreach ($cleanPropertyValue as $containedObject) {
489  if (!$propertyValue->contains($containedObject)) {
490  $removedObjects[] = $containedObject;
491  }
492  }
493  }
494  return $removedObjects;
495  }
496 
505  protected function ‪attachObjectToParentObject(DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition = 0)
506  {
507  $parentDataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject));
508 
509  $parentColumnMap = $parentDataMap->getColumnMap($parentPropertyName);
510  if ($parentColumnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_MANY) {
511  $this->‪attachObjectToParentObjectRelationHasMany($object, $parentObject, $parentPropertyName, $sortingPosition);
512  } elseif ($parentColumnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY) {
513  $this->‪insertRelationInRelationtable($object, $parentObject, $parentPropertyName, $sortingPosition);
514  }
515  }
516 
525  protected function ‪updateRelationOfObjectToParentObject(DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition = 0)
526  {
527  $parentDataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject));
528  $parentColumnMap = $parentDataMap->getColumnMap($parentPropertyName);
529  if ($parentColumnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_MANY) {
530  $this->‪attachObjectToParentObjectRelationHasMany($object, $parentObject, $parentPropertyName, $sortingPosition);
531  } elseif ($parentColumnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY) {
532  $this->‪updateRelationInRelationTable($object, $parentObject, $parentPropertyName, $sortingPosition);
533  }
534  }
535 
545  protected function ‪attachObjectToParentObjectRelationHasMany(DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition = 0)
546  {
547  $parentDataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject));
548  $parentColumnMap = $parentDataMap->getColumnMap($parentPropertyName);
549  if ($parentColumnMap->getTypeOfRelation() !== ‪ColumnMap::RELATION_HAS_MANY) {
550  throw new IllegalRelationTypeException(
551  'Parent column relation type is ' . $parentColumnMap->getTypeOfRelation() .
552  ' but should be ' . ‪ColumnMap::RELATION_HAS_MANY,
553  1345368105
554  );
555  }
556  $row = [];
557  $parentKeyFieldName = $parentColumnMap->getParentKeyFieldName();
558  if ($parentKeyFieldName !== null) {
559  $row[$parentKeyFieldName] = $parentObject->_getProperty('_localizedUid') ?: $parentObject->getUid();
560  $parentTableFieldName = $parentColumnMap->getParentTableFieldName();
561  if ($parentTableFieldName !== null) {
562  $row[$parentTableFieldName] = $parentDataMap->getTableName();
563  }
564  $relationTableMatchFields = $parentColumnMap->getRelationTableMatchFields();
565  if (is_array($relationTableMatchFields)) {
566  $row = array_merge($relationTableMatchFields, $row);
567  }
568  }
569  $childSortByFieldName = $parentColumnMap->getChildSortByFieldName();
570  if (!empty($childSortByFieldName)) {
571  $row[$childSortByFieldName] = $sortingPosition;
572  }
573  if (!empty($row)) {
574  $this->‪updateObject($object, $row);
575  }
576  }
577 
585  protected function ‪detachObjectFromParentObject(DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName)
586  {
587  $parentDataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject));
588  $parentColumnMap = $parentDataMap->getColumnMap($parentPropertyName);
589  if ($parentColumnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_MANY) {
590  $row = [];
591  $parentKeyFieldName = $parentColumnMap->getParentKeyFieldName();
592  if ($parentKeyFieldName !== null) {
593  $row[$parentKeyFieldName] = 0;
594  $parentTableFieldName = $parentColumnMap->getParentTableFieldName();
595  if ($parentTableFieldName !== null) {
596  $row[$parentTableFieldName] = '';
597  }
598  $relationTableMatchFields = $parentColumnMap->getRelationTableMatchFields();
599  if (is_array($relationTableMatchFields) && !empty($relationTableMatchFields)) {
600  $row = array_merge(array_fill_keys(array_keys($relationTableMatchFields), ''), $row);
601  }
602  }
603  $childSortByFieldName = $parentColumnMap->getChildSortByFieldName();
604  if (!empty($childSortByFieldName)) {
605  $row[$childSortByFieldName] = 0;
606  }
607  if (!empty($row)) {
608  $this->‪updateObject($object, $row);
609  }
610  } elseif ($parentColumnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY) {
611  $this->‪deleteRelationFromRelationtable($object, $parentObject, $parentPropertyName);
612  }
613  }
614 
622  protected function ‪insertObject(DomainObjectInterface $object, DomainObjectInterface $parentObject = null, $parentPropertyName = '')
623  {
624  if ($object instanceof AbstractValueObject) {
625  $result = $this->‪getUidOfAlreadyPersistedValueObject($object);
626  if ($result !== null) {
627  $object->_setProperty('uid', $result);
628  return;
629  }
630  }
631  $dataMap = $this->dataMapFactory->buildDataMap(get_class($object));
632  $row = [];
633  $properties = $object->_getProperties();
634  foreach ($properties as $propertyName => $propertyValue) {
635  if (!$dataMap->isPersistableProperty($propertyName) || $this->propertyValueIsLazyLoaded($propertyValue)) {
636  continue;
637  }
638  $columnMap = $dataMap->getColumnMap($propertyName);
639  if ($columnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_ONE) {
640  $row[$columnMap->getColumnName()] = 0;
641  } elseif ($columnMap->getTypeOfRelation() !== ‪ColumnMap::RELATION_NONE) {
642  if ($columnMap->getParentKeyFieldName() === null) {
643  // CSV type relation
644  $row[$columnMap->getColumnName()] = '';
645  } else {
646  // MM type relation
647  $row[$columnMap->getColumnName()] = 0;
648  }
649  } elseif ($propertyValue !== null) {
650  $row[$columnMap->getColumnName()] = $this->‪getPlainValue($propertyValue, $columnMap);
651  }
652  }
653  $this->‪addCommonFieldsToRow($object, $row);
654  if ($dataMap->getLanguageIdColumnName() !== null && $object->_getProperty('_languageUid') === null) {
655  $row[$dataMap->getLanguageIdColumnName()] = 0;
656  $object->_setProperty('_languageUid', 0);
657  }
658  if ($dataMap->getTranslationOriginColumnName() !== null) {
659  $row[$dataMap->getTranslationOriginColumnName()] = 0;
660  }
661  if ($dataMap->getTranslationOriginDiffSourceName() !== null) {
662  $row[$dataMap->getTranslationOriginDiffSourceName()] = '';
663  }
664  if ($parentObject !== null && $parentPropertyName) {
665  $parentColumnDataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject))->getColumnMap($parentPropertyName);
666  $relationTableMatchFields = $parentColumnDataMap->getRelationTableMatchFields();
667  if (is_array($relationTableMatchFields)) {
668  $row = array_merge($relationTableMatchFields, $row);
669  }
670  if ($parentColumnDataMap->getParentKeyFieldName() !== null) {
671  $row[$parentColumnDataMap->getParentKeyFieldName()] = (int)$parentObject->getUid();
672  }
673  }
674  $uid = $this->storageBackend->addRow($dataMap->getTableName(), $row);
675  $object->_setProperty('uid', (int)$uid);
676  $object->setPid((int)$row['pid']);
677  if ((int)$uid >= 1) {
678  $this->eventDispatcher->dispatch(new EntityAddedToPersistenceEvent($object));
679  }
680  $frameworkConfiguration = $this->configurationManager->getConfiguration(‪ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
681  if ($frameworkConfiguration['persistence']['updateReferenceIndex'] === '1') {
682  $this->referenceIndex->updateRefIndexTable($dataMap->getTableName(), $uid);
683  }
684  $this->session->registerObject($object, $uid);
685  if ((int)$uid >= 1) {
686  $this->eventDispatcher->dispatch(new ‪EntityFinalizedAfterPersistenceEvent($object));
687  }
688  }
689 
697  {
698  return $this->storageBackend->getUidOfAlreadyPersistedValueObject($object);
699  }
700 
710  protected function ‪insertRelationInRelationtable(‪DomainObjectInterface $object, ‪DomainObjectInterface $parentObject, $propertyName, $sortingPosition = null)
711  {
712  $dataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject));
713  $columnMap = $dataMap->getColumnMap($propertyName);
714  $parentUid = $parentObject->‪getUid();
715  if ($parentObject->‪_getProperty('_localizedUid') !== null) {
716  $parentUid = $parentObject->‪_getProperty('_localizedUid');
717  }
718  $row = [
719  $columnMap->getParentKeyFieldName() => (int)$parentUid,
720  $columnMap->getChildKeyFieldName() => (int)$object->‪getUid(),
721  $columnMap->getChildSortByFieldName() => $sortingPosition !== null ? (int)$sortingPosition : 0
722  ];
723  $relationTableName = $columnMap->getRelationTableName();
724  if ($columnMap->getRelationTablePageIdColumnName() !== null) {
725  $row[$columnMap->getRelationTablePageIdColumnName()] = $this->‪determineStoragePageIdForNewRecord();
726  }
727  $relationTableMatchFields = $columnMap->getRelationTableMatchFields();
728  if (is_array($relationTableMatchFields)) {
729  $row = array_merge($relationTableMatchFields, $row);
730  }
731  $relationTableInsertFields = $columnMap->getRelationTableInsertFields();
732  if (is_array($relationTableInsertFields)) {
733  $row = array_merge($relationTableInsertFields, $row);
734  }
735  $res = $this->storageBackend->addRow($relationTableName, $row, true);
736  return $res;
737  }
738 
748  protected function ‪updateRelationInRelationTable(‪DomainObjectInterface $object, ‪DomainObjectInterface $parentObject, $propertyName, $sortingPosition = 0)
749  {
750  $dataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject));
751  $columnMap = $dataMap->getColumnMap($propertyName);
752  $row = [
753  $columnMap->getParentKeyFieldName() => (int)$parentObject->‪getUid(),
754  $columnMap->getChildKeyFieldName() => (int)$object->‪getUid(),
755  $columnMap->getChildSortByFieldName() => (int)$sortingPosition
756  ];
757  $relationTableName = $columnMap->getRelationTableName();
758  $relationTableMatchFields = $columnMap->getRelationTableMatchFields();
759  if (is_array($relationTableMatchFields)) {
760  $row = array_merge($relationTableMatchFields, $row);
761  }
762  $this->storageBackend->updateRelationTableRow(
763  $relationTableName,
764  $row
765  );
766  return true;
767  }
768 
776  protected function ‪deleteAllRelationsFromRelationtable(‪DomainObjectInterface $parentObject, $parentPropertyName)
777  {
778  $dataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject));
779  $columnMap = $dataMap->getColumnMap($parentPropertyName);
780  $relationTableName = $columnMap->getRelationTableName();
781  $relationMatchFields = [
782  $columnMap->getParentKeyFieldName() => (int)$parentObject->‪getUid()
783  ];
784  $relationTableMatchFields = $columnMap->getRelationTableMatchFields();
785  if (is_array($relationTableMatchFields)) {
786  $relationMatchFields = array_merge($relationTableMatchFields, $relationMatchFields);
787  }
788  $this->storageBackend->removeRow($relationTableName, $relationMatchFields, false);
789  return true;
790  }
791 
800  protected function ‪deleteRelationFromRelationtable(‪DomainObjectInterface $relatedObject, ‪DomainObjectInterface $parentObject, $parentPropertyName)
801  {
802  $dataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject));
803  $columnMap = $dataMap->getColumnMap($parentPropertyName);
804  $relationTableName = $columnMap->getRelationTableName();
805  $relationMatchFields = [
806  $columnMap->getParentKeyFieldName() => (int)$parentObject->‪getUid(),
807  $columnMap->getChildKeyFieldName() => (int)$relatedObject->‪getUid()
808  ];
809  $relationTableMatchFields = $columnMap->getRelationTableMatchFields();
810  if (is_array($relationTableMatchFields)) {
811  $relationMatchFields = array_merge($relationTableMatchFields, $relationMatchFields);
812  }
813  $this->storageBackend->removeRow($relationTableName, $relationMatchFields, false);
814  return true;
815  }
816 
825  protected function ‪fetchMaxSortingFromParentTable(‪DomainObjectInterface $parentObject, $parentPropertyName)
826  {
827  $parentDataMap = $this->dataMapFactory->buildDataMap(get_class($parentObject));
828  $parentColumnMap = $parentDataMap->getColumnMap($parentPropertyName);
829  if ($parentColumnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_MANY) {
830  $tableName = $parentColumnMap->getChildTableName();
831  $sortByFieldName = $parentColumnMap->getChildSortByFieldName();
832 
833  if (empty($sortByFieldName)) {
834  return false;
835  }
836  $matchFields = [];
837  $parentKeyFieldName = $parentColumnMap->getParentKeyFieldName();
838  if ($parentKeyFieldName !== null) {
839  $matchFields[$parentKeyFieldName] = $parentObject->‪getUid();
840  $parentTableFieldName = $parentColumnMap->getParentTableFieldName();
841  if ($parentTableFieldName !== null) {
842  $matchFields[$parentTableFieldName] = $parentDataMap->getTableName();
843  }
844  }
845 
846  if (empty($matchFields)) {
847  return false;
848  }
849  } elseif ($parentColumnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY) {
850  $tableName = $parentColumnMap->getRelationTableName();
851  $sortByFieldName = $parentColumnMap->getChildSortByFieldName();
852 
853  $matchFields = [
854  $parentColumnMap->getParentKeyFieldName() => (int)$parentObject->‪getUid()
855  ];
856 
857  $relationTableMatchFields = $parentColumnMap->getRelationTableMatchFields();
858  if (is_array($relationTableMatchFields)) {
859  $matchFields = array_merge($relationTableMatchFields, $matchFields);
860  }
861  } else {
862  throw new IllegalRelationTypeException('Unexpected parent column relation type: ' . $parentColumnMap->getTypeOfRelation(), 1345368106);
863  }
864 
865  $result = $this->storageBackend->getMaxValueFromTable(
866  $tableName,
867  $matchFields,
868  $sortByFieldName
869  );
870  return $result;
871  }
872 
880  protected function ‪updateObject(‪DomainObjectInterface $object, array $row)
881  {
882  $dataMap = $this->dataMapFactory->buildDataMap(get_class($object));
883  $this->‪addCommonFieldsToRow($object, $row);
884  $row['uid'] = $object->‪getUid();
885  if ($dataMap->getLanguageIdColumnName() !== null) {
886  $row[$dataMap->getLanguageIdColumnName()] = (int)$object->‪_getProperty('_languageUid');
887  if ($object->‪_getProperty('_localizedUid') !== null) {
888  $row['uid'] = $object->‪_getProperty('_localizedUid');
889  }
890  }
891  $this->storageBackend->updateRow($dataMap->getTableName(), $row);
892  $this->eventDispatcher->dispatch(new EntityUpdatedInPersistenceEvent($object));
893 
894  $frameworkConfiguration = $this->configurationManager->getConfiguration(‪ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
895  if ($frameworkConfiguration['persistence']['updateReferenceIndex'] === '1') {
896  $this->referenceIndex->updateRefIndexTable($dataMap->getTableName(), $row['uid']);
897  }
898  return true;
899  }
900 
907  protected function ‪addCommonFieldsToRow(‪DomainObjectInterface $object, array &$row)
908  {
909  $dataMap = $this->dataMapFactory->buildDataMap(get_class($object));
910  $this->‪addCommonDateFieldsToRow($object, $row);
911  if ($dataMap->getRecordTypeColumnName() !== null && $dataMap->getRecordType() !== null) {
912  $row[$dataMap->getRecordTypeColumnName()] = $dataMap->getRecordType();
913  }
914  if ($object->‪_isNew() && !isset($row['pid'])) {
915  $row['pid'] = $this->‪determineStoragePageIdForNewRecord($object);
916  }
917  }
918 
925  protected function ‪addCommonDateFieldsToRow(‪DomainObjectInterface $object, array &$row)
926  {
927  $dataMap = $this->dataMapFactory->buildDataMap(get_class($object));
928  if ($object->‪_isNew() && $dataMap->getCreationDateColumnName() !== null) {
929  $row[$dataMap->getCreationDateColumnName()] = ‪$GLOBALS['EXEC_TIME'];
930  }
931  if ($dataMap->getModificationDateColumnName() !== null) {
932  $row[$dataMap->getModificationDateColumnName()] = ‪$GLOBALS['EXEC_TIME'];
933  }
934  }
935 
939  protected function ‪processDeletedObjects()
940  {
941  foreach ($this->deletedEntities as $entity) {
942  if ($this->session->hasObject($entity)) {
943  $this->‪removeEntity($entity);
944  $this->session->unregisterReconstitutedEntity($entity);
945  $this->session->unregisterObject($entity);
946  }
947  }
948  $this->deletedEntities = new ‪ObjectStorage();
949  }
950 
957  protected function ‪removeEntity(DomainObjectInterface $object, $markAsDeleted = true)
958  {
959  $dataMap = $this->dataMapFactory->buildDataMap(get_class($object));
960  $tableName = $dataMap->getTableName();
961  if ($markAsDeleted === true && $dataMap->getDeletedFlagColumnName() !== null) {
962  $deletedColumnName = $dataMap->getDeletedFlagColumnName();
963  $row = [
964  'uid' => $object->getUid(),
965  $deletedColumnName => 1
966  ];
967  $this->‪addCommonDateFieldsToRow($object, $row);
968  $this->storageBackend->updateRow($tableName, $row);
969  } else {
970  $this->storageBackend->removeRow($tableName, ['uid' => $object->getUid()]);
971  }
972  $this->eventDispatcher->dispatch(new ‪EntityRemovedFromPersistenceEvent($object));
973 
974  $this->‪removeRelatedObjects($object);
975  $frameworkConfiguration = $this->configurationManager->getConfiguration(‪ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
976  if ($frameworkConfiguration['persistence']['updateReferenceIndex'] === '1') {
977  $this->referenceIndex->updateRefIndexTable($tableName, $object->getUid());
978  }
979  }
980 
986  protected function ‪removeRelatedObjects(‪DomainObjectInterface $object)
987  {
988  $className = get_class($object);
989  $dataMap = $this->dataMapFactory->buildDataMap($className);
990  $classSchema = $this->reflectionService->getClassSchema($className);
991  $properties = $object->‪_getProperties();
992  foreach ($properties as $propertyName => $propertyValue) {
993  $columnMap = $dataMap->getColumnMap($propertyName);
994  if ($columnMap === null) {
995  continue;
996  }
997  $property = $classSchema->getProperty($propertyName);
998  if ($property->getCascadeValue() === 'remove') {
999  if ($columnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_MANY) {
1000  foreach ($propertyValue as $containedObject) {
1001  $this->‪removeEntity($containedObject);
1002  }
1003  } elseif ($propertyValue instanceof DomainObjectInterface) {
1004  $this->‪removeEntity($propertyValue);
1005  }
1006  } elseif ($dataMap->getDeletedFlagColumnName() === null
1007  && $columnMap->getTypeOfRelation() === ‪ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY
1008  ) {
1009  $this->‪deleteAllRelationsFromRelationtable($object, $propertyName);
1010  }
1011  }
1012  }
1013 
1025  protected function ‪determineStoragePageIdForNewRecord(‪DomainObjectInterface $object = null)
1026  {
1027  $frameworkConfiguration = $this->configurationManager->getConfiguration(‪ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
1028  if ($object !== null) {
1029  if (‪ObjectAccess::isPropertyGettable($object, 'pid')) {
1030  $pid = ‪ObjectAccess::getProperty($object, 'pid');
1031  if (isset($pid)) {
1032  return (int)$pid;
1033  }
1034  }
1035  $className = get_class($object);
1036  // todo: decide what to do with this option.
1037  if (isset($frameworkConfiguration['persistence']['classes'][$className]) && !empty($frameworkConfiguration['persistence']['classes'][$className]['newRecordStoragePid'])) {
1038  return (int)$frameworkConfiguration['persistence']['classes'][$className]['newRecordStoragePid'];
1039  }
1040  }
1041  $storagePidList = ‪GeneralUtility::intExplode(',', $frameworkConfiguration['persistence']['storagePid']);
1042  return (int)$storagePidList[0];
1043  }
1044 
1055  protected function ‪getPlainValue($input, ‪ColumnMap $columnMap = null)
1056  {
1057  $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
1058  $dataMapper = $objectManager->get(DataMapper::class);
1059  return $input !== null
1060  ? $dataMapper->getPlainValue($input, $columnMap)
1061  : null;
1062  }
1063 }
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend
Definition: Backend.php:51
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$deletedEntities
‪TYPO3 CMS Extbase Persistence ObjectStorage $deletedEntities
Definition: Backend.php:66
‪TYPO3\CMS\Extbase\Event\Persistence\EntityFinalizedAfterPersistenceEvent
Definition: EntityFinalizedAfterPersistenceEvent.php:27
‪TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\getUid
‪int getUid()
‪TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface
Definition: PersistenceManagerInterface.php:22
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:18
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\insertObject
‪insertObject(DomainObjectInterface $object, DomainObjectInterface $parentObject=null, $parentPropertyName='')
Definition: Backend.php:608
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$reflectionService
‪TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
Definition: Backend.php:78
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getUidOfAlreadyPersistedValueObject
‪int null getUidOfAlreadyPersistedValueObject(AbstractValueObject $object)
Definition: Backend.php:682
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$qomFactory
‪TYPO3 CMS Extbase Persistence Generic Qom QueryObjectModelFactory $qomFactory
Definition: Backend.php:82
‪TYPO3\CMS\Extbase\Persistence\QueryInterface
Definition: QueryInterface.php:29
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getQomFactory
‪TYPO3 CMS Extbase Persistence Generic Qom QueryObjectModelFactory getQomFactory()
Definition: Backend.php:168
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$storageBackend
‪TYPO3 CMS Extbase Persistence Generic Storage BackendInterface $storageBackend
Definition: Backend.php:86
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$session
‪TYPO3 CMS Extbase Persistence Generic Session $session
Definition: Backend.php:54
‪TYPO3\CMS\Extbase\Event\Persistence\EntityAddedToPersistenceEvent
Definition: EntityAddedToPersistenceEvent.php:27
‪TYPO3\CMS\Core\Database\ReferenceIndex
Definition: ReferenceIndex.php:48
‪TYPO3
‪TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_setProperty
‪_setProperty(string $propertyName, $value)
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap
Definition: ColumnMap.php:28
‪TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_isNew
‪bool _isNew()
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getReflectionService
‪TYPO3 CMS Extbase Reflection ReflectionService getReflectionService()
Definition: Backend.php:178
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage\getPosition
‪int null getPosition($object)
Definition: ObjectStorage.php:369
‪TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_getProperty
‪mixed _getProperty(string $propertyName)
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_AND_BELONGS_TO_MANY
‪const RELATION_HAS_AND_BELONGS_TO_MANY
Definition: ColumnMap.php:52
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory
Definition: QueryObjectModelFactory.php:27
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\addCommonFieldsToRow
‪addCommonFieldsToRow(DomainObjectInterface $object, array &$row)
Definition: Backend.php:893
‪TYPO3\CMS\Extbase\Event\Persistence\EntityRemovedFromPersistenceEvent
Definition: EntityRemovedFromPersistenceEvent.php:26
‪TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
Definition: ConfigurationManagerInterface.php:28
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\attachObjectToParentObject
‪attachObjectToParentObject(DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition=0)
Definition: Backend.php:491
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\persistObjectStorage
‪persistObjectStorage(ObjectStorage $objectStorage, DomainObjectInterface $parentObject, $propertyName, array &$row)
Definition: Backend.php:404
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\processDeletedObjects
‪processDeletedObjects()
Definition: Backend.php:925
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
Definition: DataMapper.php:52
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\persistObject
‪persistObject(DomainObjectInterface $object)
Definition: Backend.php:322
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\commit
‪commit()
Definition: Backend.php:293
‪TYPO3\CMS\Extbase\Event\Persistence\ModifyResultAfterFetchingObjectDataEvent
Definition: ModifyResultAfterFetchingObjectDataEvent.php:26
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$configurationManager
‪TYPO3 CMS Extbase Configuration ConfigurationManagerInterface $configurationManager
Definition: Backend.php:100
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_MANY
‪const RELATION_HAS_MANY
Definition: ColumnMap.php:42
‪TYPO3\CMS\Extbase\Reflection\ObjectAccess
Definition: ObjectAccess.php:38
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_ONE
‪const RELATION_HAS_ONE
Definition: ColumnMap.php:37
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage
Definition: ObjectStorage.php:28
‪TYPO3\CMS\Extbase\Persistence\Exception\IllegalRelationTypeException
Definition: IllegalRelationTypeException.php:26
‪TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK
‪const CONFIGURATION_TYPE_FRAMEWORK
Definition: ConfigurationManagerInterface.php:29
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory
Definition: DataMapFactory.php:42
‪TYPO3\CMS\Extbase\Reflection\ReflectionService
Definition: ReflectionService.php:31
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\setPersistenceManager
‪setPersistenceManager(PersistenceManagerInterface $persistenceManager)
Definition: Backend.php:148
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeRelatedObjects
‪removeRelatedObjects(DomainObjectInterface $object)
Definition: Backend.php:972
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$eventDispatcher
‪EventDispatcherInterface $eventDispatcher
Definition: Backend.php:108
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getPlainValue
‪int string null getPlainValue($input, ColumnMap $columnMap=null)
Definition: Backend.php:1041
‪TYPO3\CMS\Extbase\Reflection\ObjectAccess\isPropertyGettable
‪static bool isPropertyGettable($object, $propertyName)
Definition: ObjectAccess.php:333
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$aggregateRootObjects
‪TYPO3 CMS Extbase Persistence ObjectStorage $aggregateRootObjects
Definition: Backend.php:62
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\propertyValueIsLazyLoaded
‪bool propertyValueIsLazyLoaded($propertyValue)
Definition: Backend.php:380
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\determineStoragePageIdForNewRecord
‪int determineStoragePageIdForNewRecord(DomainObjectInterface $object=null)
Definition: Backend.php:1011
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getObjectCountByQuery
‪int getObjectCountByQuery(QueryInterface $query)
Definition: Backend.php:189
‪TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
Definition: BackendInterface.php:26
‪TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
Definition: AbstractValueObject.php:24
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$visitedDuringPersistence
‪TYPO3 CMS Extbase Persistence ObjectStorage $visitedDuringPersistence
Definition: Backend.php:74
‪TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface
Definition: DomainObjectInterface.php:29
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getObjectDataByQuery
‪array getObjectDataByQuery(QueryInterface $query)
Definition: Backend.php:200
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$referenceIndex
‪TYPO3 CMS Core Database ReferenceIndex $referenceIndex
Definition: Backend.php:96
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\setAggregateRootObjects
‪setAggregateRootObjects(ObjectStorage $objects)
Definition: Backend.php:265
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeEntity
‪removeEntity(DomainObjectInterface $object, $markAsDeleted=true)
Definition: Backend.php:943
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_NONE
‪const RELATION_NONE
Definition: ColumnMap.php:32
‪TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_getProperties
‪array _getProperties()
‪TYPO3\CMS\Extbase\Persistence\Generic\Session
Definition: Session.php:27
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\setChangedEntities
‪setChangedEntities(ObjectStorage $entities)
Definition: Backend.php:275
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\deleteAllRelationsFromRelationtable
‪bool deleteAllRelationsFromRelationtable(DomainObjectInterface $parentObject, $parentPropertyName)
Definition: Backend.php:762
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\insertRelationInRelationtable
‪int insertRelationInRelationtable(DomainObjectInterface $object, DomainObjectInterface $parentObject, $propertyName, $sortingPosition=null)
Definition: Backend.php:696
‪TYPO3\CMS\Extbase\Event\Persistence\EntityUpdatedInPersistenceEvent
Definition: EntityUpdatedInPersistenceEvent.php:26
‪TYPO3\CMS\Extbase\Persistence\Generic
Definition: Backend.php:16
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateRelationInRelationTable
‪bool updateRelationInRelationTable(DomainObjectInterface $object, DomainObjectInterface $parentObject, $propertyName, $sortingPosition=0)
Definition: Backend.php:734
‪TYPO3\CMS\Extbase\Event\Persistence\ModifyQueryBeforeFetchingObjectDataEvent
Definition: ModifyQueryBeforeFetchingObjectDataEvent.php:26
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$dataMapFactory
‪TYPO3 CMS Extbase Persistence Generic Mapper DataMapFactory $dataMapFactory
Definition: Backend.php:90
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage\isRelationDirty
‪bool isRelationDirty($object)
Definition: ObjectStorage.php:358
‪TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy
Definition: LazyLoadingProxy.php:29
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:23
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getRemovedChildObjects
‪array getRemovedChildObjects(DomainObjectInterface $object, $propertyName)
Definition: Backend.php:468
‪TYPO3\CMS\Core\Utility\GeneralUtility\intExplode
‪static int[] intExplode($delimiter, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:988
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\isNewObject
‪bool isNewObject($object)
Definition: Backend.php:255
‪TYPO3\CMS\Extbase\Event\Persistence\EntityPersistedEvent
Definition: EntityPersistedEvent.php:26
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\fetchMaxSortingFromParentTable
‪mixed fetchMaxSortingFromParentTable(DomainObjectInterface $parentObject, $parentPropertyName)
Definition: Backend.php:811
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getObjectByIdentifier
‪object null getObjectByIdentifier($identifier, $className)
Definition: Backend.php:237
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getSession
‪TYPO3 CMS Extbase Persistence Generic Session getSession()
Definition: Backend.php:158
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateRelationOfObjectToParentObject
‪updateRelationOfObjectToParentObject(DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition=0)
Definition: Backend.php:511
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\persistObjects
‪persistObjects()
Definition: Backend.php:302
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$changedEntities
‪TYPO3 CMS Extbase Persistence ObjectStorage $changedEntities
Definition: Backend.php:70
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage
Definition: LazyObjectStorage.php:30
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\attachObjectToParentObjectRelationHasMany
‪attachObjectToParentObjectRelationHasMany(DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition=0)
Definition: Backend.php:531
‪TYPO3\CMS\Extbase\Object\ObjectManager
Definition: ObjectManager.php:28
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\setDeletedEntities
‪setDeletedEntities(ObjectStorage $entities)
Definition: Backend.php:285
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\__construct
‪__construct(ConfigurationManagerInterface $configurationManager, Session $session, ReflectionService $reflectionService, QueryObjectModelFactory $qomFactory, \TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface $storageBackend, DataMapFactory $dataMapFactory, EventDispatcherInterface $eventDispatcher)
Definition: Backend.php:121
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateObject
‪bool updateObject(DomainObjectInterface $object, array $row)
Definition: Backend.php:866
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\detachObjectFromParentObject
‪detachObjectFromParentObject(DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName)
Definition: Backend.php:571
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\addCommonDateFieldsToRow
‪addCommonDateFieldsToRow(DomainObjectInterface $object, array &$row)
Definition: Backend.php:911
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$signalSlotDispatcher
‪TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
Definition: Backend.php:104
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\deleteRelationFromRelationtable
‪bool deleteRelationFromRelationtable(DomainObjectInterface $relatedObject, DomainObjectInterface $parentObject, $parentPropertyName)
Definition: Backend.php:786
‪TYPO3\CMS\Extbase\Reflection\ObjectAccess\getProperty
‪static mixed getProperty($subject, string $propertyName, bool $forceDirectAccess=false)
Definition: ObjectAccess.php:62
‪TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\setPid
‪setPid(int $pid)
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\$persistenceManager
‪TYPO3 CMS Extbase Persistence PersistenceManagerInterface $persistenceManager
Definition: Backend.php:58
‪TYPO3\CMS\Extbase\Persistence\ObjectMonitoringInterface
Definition: ObjectMonitoringInterface.php:25
‪TYPO3\CMS\Extbase\Persistence\Generic\Backend\getIdentifierByObject
‪string null getIdentifierByObject($object)
Definition: Backend.php:218
‪TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_getCleanProperty
‪mixed _getCleanProperty(string $propertyName)