TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Persistence\Generic\Backend Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Persistence\Generic\Backend:
TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface TYPO3\CMS\Core\SingletonInterface Tx_Extbase_Persistence_Backend

Public Member Functions

 __construct (\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager)
 
 setPersistenceManager (\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager)
 
 getSession ()
 
 getDataMapper ()
 
 getQomFactory ()
 
 getReflectionService ()
 
 getObjectCountByQuery (\TYPO3\CMS\Extbase\Persistence\QueryInterface $query)
 
 getObjectDataByQuery (\TYPO3\CMS\Extbase\Persistence\QueryInterface $query)
 
 getIdentifierByObject ($object)
 
 getObjectByIdentifier ($identifier, $className)
 
 isNewObject ($object)
 
 replaceObject ($existingObject, $newObject)
 
 setAggregateRootObjects (\TYPO3\CMS\Extbase\Persistence\ObjectStorage $objects)
 
 setChangedEntities (\TYPO3\CMS\Extbase\Persistence\ObjectStorage $entities)
 
 setDeletedEntities (\TYPO3\CMS\Extbase\Persistence\ObjectStorage $entities)
 
 commit ()
 
 setDeletedObjects (\TYPO3\CMS\Extbase\Persistence\ObjectStorage $objects)
 

Protected Member Functions

 emitBeforeGettingObjectDataSignal (\TYPO3\CMS\Extbase\Persistence\QueryInterface $query)
 
 emitAfterGettingObjectDataSignal (\TYPO3\CMS\Extbase\Persistence\QueryInterface $query, array $result)
 
 persistObject (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object)
 
 propertyValueIsLazyLoaded ($propertyValue)
 
 getRemovedChildObjects (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, $propertyName)
 
 attachObjectToParentObject (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition=0)
 
 updateRelationOfObjectToParentObject (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, \TYPO3\CMS\Extbase\DomainObject\AbstractEntity $parentObject, $parentPropertyName, $sortingPosition=0)
 
 attachObjectToParentObjectRelationHasMany (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, \TYPO3\CMS\Extbase\DomainObject\AbstractEntity $parentObject, $parentPropertyName, $sortingPosition=0)
 
 detachObjectFromParentObject (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject, $parentPropertyName)
 
 insertObject (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject=NULL, $parentPropertyName='')
 
 emitAfterInsertObjectSignal (DomainObjectInterface $object)
 
 getUidOfAlreadyPersistedValueObject (\TYPO3\CMS\Extbase\DomainObject\AbstractValueObject $object)
 
 insertRelationInRelationtable (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject, $propertyName, $sortingPosition=NULL)
 
 updateRelationInRelationTable (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject, $propertyName, $sortingPosition=0)
 
 deleteAllRelationsFromRelationtable (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject, $parentPropertyName)
 
 deleteRelationFromRelationtable (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $relatedObject, \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject, $parentPropertyName)
 
 fetchMaxSortingFromParentTable (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject, $parentPropertyName)
 
 updateObject (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, array $row)
 
 emitAfterUpdateObjectSignal (DomainObjectInterface $object)
 
 addCommonFieldsToRow (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, array &$row)
 
 addCommonDateFieldsToRow (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, array &$row)
 
 processDeletedObjects ()
 
 removeEntity (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, $markAsDeleted=TRUE)
 
 emitAfterRemoveObjectSignal (DomainObjectInterface $object)
 
 removeRelatedObjects (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object)
 
 determineStoragePageIdForNewRecord (\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object=NULL)
 
 getPlainValue ($input, $columnMap=NULL)
 

Protected Attributes

 $session
 
 $persistenceManager
 
 $aggregateRootObjects
 
 $deletedEntities
 
 $changedEntities
 
 $visitedDuringPersistence
 
 $reflectionService
 
 $qomFactory
 
 $storageBackend
 
 $dataMapper
 
 $referenceIndex
 
 $configurationManager
 
 $signalSlotDispatcher
 

Detailed Description

A persistence backend. This backend maps objects to the relational model of the storage backend. It persists all added, removed and changed objects.

Definition at line 24 of file Backend.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::__construct ( \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface  $configurationManager)

Constructs the backend

Parameters
\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface$configurationManager

Definition at line 104 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\$configurationManager, and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Member Function Documentation

◆ addCommonDateFieldsToRow()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::addCommonDateFieldsToRow ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
array &  $row 
)
protected

Adjustes the common date fields of the given row to the current time

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object
array&$rowThe row to be updated
Returns
void

Definition at line 909 of file Backend.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\addCommonFieldsToRow(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeEntity().

◆ addCommonFieldsToRow()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::addCommonFieldsToRow ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
array &  $row 
)
protected

Adds common databse fields to a row

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object
array&$row
Returns
void

Definition at line 891 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\addCommonDateFieldsToRow(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\determineStoragePageIdForNewRecord().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\insertObject(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateObject().

◆ attachObjectToParentObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::attachObjectToParentObject ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $parentObject,
  $parentPropertyName,
  $sortingPosition = 0 
)
protected

Updates the fields defining the relation between the object and the parent object.

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObject
string$parentPropertyName
integer$sortingPosition
Returns
void

Definition at line 509 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\attachObjectToParentObjectRelationHasMany(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\insertRelationInRelationtable(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_AND_BELONGS_TO_MANY, and TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_MANY.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\propertyValueIsLazyLoaded().

◆ attachObjectToParentObjectRelationHasMany()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::attachObjectToParentObjectRelationHasMany ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
\TYPO3\CMS\Extbase\DomainObject\AbstractEntity  $parentObject,
  $parentPropertyName,
  $sortingPosition = 0 
)
protected

Updates fields defining the relation between the object and the parent object in relation has-many.

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object
\TYPO3\CMS\Extbase\DomainObject\AbstractEntity$parentObject
string$parentPropertyName
integer$sortingPosition
Exceptions

Definition at line 548 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_MANY, and TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateObject().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\attachObjectToParentObject(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateRelationOfObjectToParentObject().

◆ commit()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::commit ( )

Commits the current persistence session.

Returns
void

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 305 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\processDeletedObjects().

◆ deleteAllRelationsFromRelationtable()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::deleteAllRelationsFromRelationtable ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $parentObject,
  $parentPropertyName 
)
protected

Delete all mm-relations of a parent from a relation table

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObjectThe parent object
string$parentPropertyNameThe name of the parent object's property where the related objects are stored in
Returns
bool TRUE if delete was successfully

Definition at line 754 of file Backend.php.

◆ deleteRelationFromRelationtable()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::deleteRelationFromRelationtable ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $relatedObject,
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $parentObject,
  $parentPropertyName 
)
protected

Delete an mm-relation from a relation table

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$relatedObjectThe related object
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObjectThe parent object
string$parentPropertyNameThe name of the parent object's property where the related objects are stored in
Returns
boolean

Definition at line 777 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\detachObjectFromParentObject().

◆ detachObjectFromParentObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::detachObjectFromParentObject ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $parentObject,
  $parentPropertyName 
)
protected

Updates the fields defining the relation between the object and the parent object.

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObject
string$parentPropertyName
Returns
void

Definition at line 588 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\deleteRelationFromRelationtable(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_AND_BELONGS_TO_MANY, TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_MANY, and TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateObject().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\propertyValueIsLazyLoaded().

◆ determineStoragePageIdForNewRecord()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::determineStoragePageIdForNewRecord ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object = NULL)
protected

Determine the storage page ID for a given NEW record

This does the following:

  • If the domain object has an accessible property 'pid' (i.e. through a getPid() method), that is used to store the record.
  • If there is a TypoScript configuration "classes.CLASSNAME.newRecordStoragePid", that is used to store new records.
  • If there is no such TypoScript configuration, it uses the first value of The "storagePid" taken for reading records.
Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object
Returns
integer the storage Page ID where the object should be stored

Definition at line 1012 of file Backend.php.

References TYPO3\CMS\Extbase\Reflection\ObjectAccess\getProperty(), and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\addCommonFieldsToRow(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\insertRelationInRelationtable().

◆ emitAfterGettingObjectDataSignal()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::emitAfterGettingObjectDataSignal ( \TYPO3\CMS\Extbase\Persistence\QueryInterface  $query,
array  $result 
)
protected

Emits a signal after object data is fetched

Parameters
\TYPO3\CMS\Extbase\Persistence\QueryInterface$query
array$result
Returns
array Modified result

Definition at line 198 of file Backend.php.

◆ emitAfterInsertObjectSignal()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::emitAfterInsertObjectSignal ( DomainObjectInterface  $object)
protected

Emits a signal after an object was added to the storage

Parameters
DomainObjectInterface$object

Definition at line 668 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\insertObject().

◆ emitAfterRemoveObjectSignal()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::emitAfterRemoveObjectSignal ( DomainObjectInterface  $object)
protected

Emits a signal after an object was removed from storage

Parameters
DomainObjectInterface$object

Definition at line 971 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeEntity().

◆ emitAfterUpdateObjectSignal()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::emitAfterUpdateObjectSignal ( DomainObjectInterface  $object)
protected

Emits a signal after an object was updated in storage

Parameters
DomainObjectInterface$object

Definition at line 880 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateObject().

◆ emitBeforeGettingObjectDataSignal()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::emitBeforeGettingObjectDataSignal ( \TYPO3\CMS\Extbase\Persistence\QueryInterface  $query)
protected

Emits a signal before object data is fetched

Parameters
\TYPO3\CMS\Extbase\Persistence\QueryInterface$query
Returns
Modified query

Definition at line 186 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\getObjectDataByQuery().

◆ fetchMaxSortingFromParentTable()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::fetchMaxSortingFromParentTable ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $parentObject,
  $parentPropertyName 
)
protected

Fetches maximal value currently used for sorting field in parent table

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObjectThe parent object
string$parentPropertyNameThe name of the parent object's property where the related objects are stored in
Exceptions

Definition at line 801 of file Backend.php.

References $result, TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_AND_BELONGS_TO_MANY, and TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_MANY.

◆ getDataMapper()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getDataMapper ( )

Returns the Data Mapper

Returns

Definition at line 133 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\$dataMapper.

◆ getIdentifierByObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getIdentifierByObject (   $object)

Returns the (internal) identifier for the object, if it is known to the backend. Otherwise NULL is returned.

Parameters
object$object
Returns
string The identifier for the object if it is known, or NULL

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 210 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\isNewObject().

◆ getObjectByIdentifier()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getObjectByIdentifier (   $identifier,
  $className 
)

Returns the object with the (internal) identifier, if it is known to the backend. Otherwise NULL is returned.

Parameters
string$identifier
string$className
Returns
object The object for the identifier if it is known, or NULL

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 228 of file Backend.php.

◆ getObjectCountByQuery()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getObjectCountByQuery ( \TYPO3\CMS\Extbase\Persistence\QueryInterface  $query)

Returns the number of records matching the query.

Parameters
\TYPO3\CMS\Extbase\Persistence\QueryInterface$query
Returns
integer

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 162 of file Backend.php.

◆ getObjectDataByQuery()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getObjectDataByQuery ( \TYPO3\CMS\Extbase\Persistence\QueryInterface  $query)

Returns the object data matching the $query.

Parameters
\TYPO3\CMS\Extbase\Persistence\QueryInterface$query
Returns
array

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 173 of file Backend.php.

References $result, and TYPO3\CMS\Extbase\Persistence\Generic\Backend\emitBeforeGettingObjectDataSignal().

◆ getPlainValue()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getPlainValue (   $input,
  $columnMap = NULL 
)
protected

Returns a plain value, i.e. objects are flattened out if possible.

Parameters
mixed$input
\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap$columnMap
Returns
mixed

Definition at line 1037 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\persistObject().

◆ getQomFactory()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getQomFactory ( )

Returns the current QOM factory

Returns

Definition at line 142 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\$qomFactory.

◆ getReflectionService()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getReflectionService ( )

Returns the reflection service

Returns

Definition at line 151 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\$reflectionService.

◆ getRemovedChildObjects()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getRemovedChildObjects ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
  $propertyName 
)
protected

Returns the removed objects determined by a comparison of the clean property value with the actual property value.

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$objectThe object
string$propertyName
Returns
array An array of removed objects

Definition at line 486 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\propertyValueIsLazyLoaded().

◆ getSession()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getSession ( )

Returns the repository session

Returns

Definition at line 124 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\$session.

◆ getUidOfAlreadyPersistedValueObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::getUidOfAlreadyPersistedValueObject ( \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject  $object)
protected

Tests, if the given Value Object already exists in the storage backend and if so, it returns the uid.

Parameters
\TYPO3\CMS\Extbase\DomainObject\AbstractValueObject$objectThe object to be tested
Returns
mixed The matching uid if an object was found, else FALSE

Definition at line 678 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\insertObject().

◆ insertObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::insertObject ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $parentObject = NULL,
  $parentPropertyName = '' 
)
protected

Inserts an object in the storage backend

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$objectThe object to be insterted in the storage
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObjectThe parentobject.
string$parentPropertyName
Returns
void

Definition at line 625 of file Backend.php.

References $result, $uid, TYPO3\CMS\Extbase\Persistence\Generic\Backend\addCommonFieldsToRow(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\emitAfterInsertObjectSignal(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\getUidOfAlreadyPersistedValueObject().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\persistObject(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\propertyValueIsLazyLoaded(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\setDeletedObjects().

◆ insertRelationInRelationtable()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::insertRelationInRelationtable ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $parentObject,
  $propertyName,
  $sortingPosition = NULL 
)
protected

Inserts mm-relation into a relation table

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$objectThe related object
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObjectThe parent object
string$propertyNameThe name of the parent object's property where the related objects are stored in
integer$sortingPositionDefaults to NULL
Returns
integer The uid of the inserted row

Definition at line 691 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\determineStoragePageIdForNewRecord().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\attachObjectToParentObject().

◆ isNewObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::isNewObject (   $object)

Checks if the given object has ever been persisted.

Parameters
object$objectThe object to check
Returns
boolean TRUE if the object is new, FALSE if the object exists in the repository

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 245 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\getIdentifierByObject().

◆ persistObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::persistObject ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object)
protected

◆ processDeletedObjects()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::processDeletedObjects ( )
protected

Iterate over deleted aggregate root objects and process them

Returns
void

Definition at line 924 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeEntity().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\commit().

◆ propertyValueIsLazyLoaded()

◆ removeEntity()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::removeEntity ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
  $markAsDeleted = TRUE 
)
protected

Deletes an object

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$objectThe object to be removed from the storage
boolean$markAsDeletedWhether to just flag the row deleted (default) or really delete it
Returns
void

Definition at line 942 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\addCommonDateFieldsToRow(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\emitAfterRemoveObjectSignal(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeRelatedObjects().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\processDeletedObjects(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\propertyValueIsLazyLoaded(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeRelatedObjects().

◆ removeRelatedObjects()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::removeRelatedObjects ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object)
protected

Remove related objects

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$objectThe object to scanned for related objects
Returns
void

Definition at line 981 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_MANY, and TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeEntity().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeEntity().

◆ replaceObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::replaceObject (   $existingObject,
  $newObject 
)

Replaces the given object by the second object.

This method will unregister the existing object at the identity map and register the new object instead. The existing object must therefore already be registered at the identity map which is the case for all reconstituted objects.

The new object will be identified by the uid which formerly belonged to the existing object. The existing object looses its uid.

Parameters
object$existingObjectThe existing object
object$newObjectThe new object
Exceptions

Definition at line 266 of file Backend.php.

◆ setAggregateRootObjects()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::setAggregateRootObjects ( \TYPO3\CMS\Extbase\Persistence\ObjectStorage  $objects)

Sets the aggregate root objects

Parameters
\TYPO3\CMS\Extbase\Persistence\ObjectStorage$objects
Returns
void

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 276 of file Backend.php.

◆ setChangedEntities()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::setChangedEntities ( \TYPO3\CMS\Extbase\Persistence\ObjectStorage  $entities)

Sets the changed objects

Parameters
\TYPO3\CMS\Extbase\Persistence\ObjectStorage$entities
Returns
void

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 286 of file Backend.php.

◆ setDeletedEntities()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::setDeletedEntities ( \TYPO3\CMS\Extbase\Persistence\ObjectStorage  $entities)

Sets the deleted objects

Parameters
\TYPO3\CMS\Extbase\Persistence\ObjectStorage$entities
Returns
void

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 296 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\setDeletedObjects().

◆ setDeletedObjects()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::setDeletedObjects ( \TYPO3\CMS\Extbase\Persistence\ObjectStorage  $objects)

Sets the deleted objects

Parameters
\TYPO3\CMS\Extbase\Persistence\ObjectStorage$objects
Returns
void
Deprecated:
since 6.1, will be removed two versions later

Definition at line 317 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\insertObject(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\persistObject(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\setDeletedEntities().

◆ setPersistenceManager()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::setPersistenceManager ( \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface  $persistenceManager)
Parameters
\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface$persistenceManager

Implements TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface.

Definition at line 115 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\$persistenceManager.

◆ updateObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::updateObject ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
array  $row 
)
protected

◆ updateRelationInRelationTable()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::updateRelationInRelationTable ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $parentObject,
  $propertyName,
  $sortingPosition = 0 
)
protected

Updates mm-relation in a relation table

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$objectThe related object
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObjectThe parent object
string$propertyNameThe name of the parent object's property where the related objects are stored in
integer$sortingPositionDefaults to NULL
Returns
bool TRUE if update was successfully

Definition at line 728 of file Backend.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateRelationOfObjectToParentObject().

◆ updateRelationOfObjectToParentObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::updateRelationOfObjectToParentObject ( \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface  $object,
\TYPO3\CMS\Extbase\DomainObject\AbstractEntity  $parentObject,
  $parentPropertyName,
  $sortingPosition = 0 
)
protected

Updates the fields defining the relation between the object and the parent object.

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object
\TYPO3\CMS\Extbase\DomainObject\AbstractEntity$parentObject
string$parentPropertyName
integer$sortingPosition
Returns
void

Definition at line 528 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\attachObjectToParentObjectRelationHasMany(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_AND_BELONGS_TO_MANY, TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_MANY, and TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateRelationInRelationTable().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Backend\propertyValueIsLazyLoaded().

Member Data Documentation

◆ $aggregateRootObjects

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$aggregateRootObjects
protected

Definition at line 40 of file Backend.php.

◆ $changedEntities

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$changedEntities
protected

Definition at line 50 of file Backend.php.

◆ $configurationManager

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$configurationManager
protected

◆ $dataMapper

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$dataMapper
protected

◆ $deletedEntities

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$deletedEntities
protected

Definition at line 45 of file Backend.php.

◆ $persistenceManager

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$persistenceManager
protected

◆ $qomFactory

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$qomFactory
protected

◆ $referenceIndex

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$referenceIndex
protected

Definition at line 86 of file Backend.php.

◆ $reflectionService

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$reflectionService
protected

◆ $session

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$session
protected

◆ $signalSlotDispatcher

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$signalSlotDispatcher
protected

Definition at line 97 of file Backend.php.

◆ $storageBackend

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$storageBackend
protected

Definition at line 73 of file Backend.php.

◆ $visitedDuringPersistence

TYPO3\CMS\Extbase\Persistence\Generic\Backend::$visitedDuringPersistence
protected

Definition at line 55 of file Backend.php.