‪TYPO3CMS  10.4
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

Public Member Functions

 __construct (ConfigurationManagerInterface $configurationManager, Session $session, ReflectionService $reflectionService, QueryObjectModelFactory $qomFactory, \TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface $storageBackend, DataMapFactory $dataMapFactory, EventDispatcherInterface $eventDispatcher)
 
 setPersistenceManager (PersistenceManagerInterface $persistenceManager)
 
TYPO3 CMS Extbase Persistence Generic Session getSession ()
 
TYPO3 CMS Extbase Persistence Generic Qom QueryObjectModelFactory getQomFactory ()
 
TYPO3 CMS Extbase Reflection ReflectionService getReflectionService ()
 
int getObjectCountByQuery (QueryInterface $query)
 
array getObjectDataByQuery (QueryInterface $query)
 
string null getIdentifierByObject ($object)
 
object null getObjectByIdentifier ($identifier, $className)
 
bool isNewObject ($object)
 
 setAggregateRootObjects (ObjectStorage $objects)
 
 setChangedEntities (ObjectStorage $entities)
 
 setDeletedEntities (ObjectStorage $entities)
 
 commit ()
 

Protected Member Functions

 persistObjects ()
 
 persistObject (DomainObjectInterface $object)
 
bool propertyValueIsLazyLoaded ($propertyValue)
 
 persistObjectStorage (ObjectStorage $objectStorage, DomainObjectInterface $parentObject, $propertyName, array &$row)
 
array getRemovedChildObjects (DomainObjectInterface $object, $propertyName)
 
 attachObjectToParentObject (DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition=0)
 
 updateRelationOfObjectToParentObject (DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition=0)
 
 attachObjectToParentObjectRelationHasMany (DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName, $sortingPosition=0)
 
 detachObjectFromParentObject (DomainObjectInterface $object, DomainObjectInterface $parentObject, $parentPropertyName)
 
 insertObject (DomainObjectInterface $object, DomainObjectInterface $parentObject=null, $parentPropertyName='')
 
int null getUidOfAlreadyPersistedValueObject (AbstractValueObject $object)
 
int insertRelationInRelationtable (DomainObjectInterface $object, DomainObjectInterface $parentObject, $propertyName, $sortingPosition=null)
 
bool updateRelationInRelationTable (DomainObjectInterface $object, DomainObjectInterface $parentObject, $propertyName, $sortingPosition=0)
 
bool deleteAllRelationsFromRelationtable (DomainObjectInterface $parentObject, $parentPropertyName)
 
bool deleteRelationFromRelationtable (DomainObjectInterface $relatedObject, DomainObjectInterface $parentObject, $parentPropertyName)
 
mixed fetchMaxSortingFromParentTable (DomainObjectInterface $parentObject, $parentPropertyName)
 
bool updateObject (DomainObjectInterface $object, array $row)
 
 addCommonFieldsToRow (DomainObjectInterface $object, array &$row)
 
 addCommonDateFieldsToRow (DomainObjectInterface $object, array &$row)
 
 processDeletedObjects ()
 
 removeEntity (DomainObjectInterface $object, $markAsDeleted=true)
 
 removeRelatedObjects (DomainObjectInterface $object)
 
int determineStoragePageIdForNewRecord (DomainObjectInterface $object=null)
 
int string null getPlainValue ($input, ColumnMap $columnMap=null)
 

Protected Attributes

TYPO3 CMS Extbase Persistence Generic Session $session
 
TYPO3 CMS Extbase Persistence PersistenceManagerInterface $persistenceManager
 
TYPO3 CMS Extbase Persistence ObjectStorage $aggregateRootObjects
 
TYPO3 CMS Extbase Persistence ObjectStorage $deletedEntities
 
TYPO3 CMS Extbase Persistence ObjectStorage $changedEntities
 
TYPO3 CMS Extbase Persistence ObjectStorage $visitedDuringPersistence
 
TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
 
TYPO3 CMS Extbase Persistence Generic Qom QueryObjectModelFactory $qomFactory
 
TYPO3 CMS Extbase Persistence Generic Storage BackendInterface $storageBackend
 
TYPO3 CMS Extbase Persistence Generic Mapper DataMapFactory $dataMapFactory
 
TYPO3 CMS Core Database ReferenceIndex $referenceIndex
 
TYPO3 CMS Extbase Configuration ConfigurationManagerInterface $configurationManager
 
TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
 
EventDispatcherInterface $eventDispatcher
 

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.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 50 of file Backend.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::__construct ( ConfigurationManagerInterface  $configurationManager,
Session  $session,
ReflectionService  $reflectionService,
QueryObjectModelFactory  $qomFactory,
\TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface  $storageBackend,
DataMapFactory  $dataMapFactory,
EventDispatcherInterface  $eventDispatcher 
)

Constructs the backend

Parameters
\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface$configurationManager
Session$session
\TYPO3\CMS\Extbase\Reflection\ReflectionService$reflectionService
\TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory$qomFactory
\TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface$storageBackend
\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory$dataMapFactory
EventDispatcherInterface$eventDispatcher

Definition at line 121 of file Backend.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Backend\$configurationManager, TYPO3\CMS\Extbase\Persistence\Generic\Backend\$dataMapFactory, TYPO3\CMS\Extbase\Persistence\Generic\Backend\$eventDispatcher, TYPO3\CMS\Extbase\Persistence\Generic\Backend\$qomFactory, TYPO3\CMS\Extbase\Persistence\Generic\Backend\$reflectionService, TYPO3\CMS\Extbase\Persistence\Generic\Backend\$session, and TYPO3\CMS\Extbase\Persistence\Generic\Backend\$storageBackend.

Member Function Documentation

◆ addCommonDateFieldsToRow()

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

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

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object
array$row‪The row to be updated

Definition at line 911 of file Backend.php.

References $GLOBALS, and TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_isNew().

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 ( DomainObjectInterface  $object,
array &  $row 
)
protected

◆ attachObjectToParentObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::attachObjectToParentObject ( DomainObjectInterface  $object,
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
int$sortingPosition

Definition at line 491 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\persistObjectStorage().

◆ attachObjectToParentObjectRelationHasMany()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::attachObjectToParentObjectRelationHasMany ( DomainObjectInterface  $object,
DomainObjectInterface  $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\DomainObjectInterface$parentObject
string$parentPropertyName
int$sortingPosition
Exceptions

Definition at line 531 of file Backend.php.

References TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_getProperty(), TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\getUid(), 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 ( )

◆ deleteAllRelationsFromRelationtable()

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

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

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

Definition at line 762 of file Backend.php.

References TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\getUid().

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

◆ deleteRelationFromRelationtable()

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

Delete an mm-relation from a relation table

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$relatedObject‪The related object
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObject‪The parent object
string$parentPropertyName‪The name of the parent object's property where the related objects are stored in
Returns
‪bool

Definition at line 786 of file Backend.php.

References TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\getUid().

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

◆ detachObjectFromParentObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::detachObjectFromParentObject ( DomainObjectInterface  $object,
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

Definition at line 571 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\persistObjectStorage().

◆ determineStoragePageIdForNewRecord()

int TYPO3\CMS\Extbase\Persistence\Generic\Backend::determineStoragePageIdForNewRecord ( 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
‪int the storage Page ID where the object should be stored

Definition at line 1011 of file Backend.php.

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

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

◆ fetchMaxSortingFromParentTable()

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

Fetches maximal value currently used for sorting field in parent table

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

Definition at line 811 of file Backend.php.

References TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\getUid(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_AND_BELONGS_TO_MANY, and TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_MANY.

◆ getIdentifierByObject()

string null 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|null The identifier for the object if it is known, or NULL

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

Definition at line 218 of file Backend.php.

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

◆ getObjectByIdentifier()

object null 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|null The object for the identifier if it is known, or NULL

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

Definition at line 237 of file Backend.php.

◆ getObjectCountByQuery()

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

Returns the number of records matching the query.

Parameters
\TYPO3\CMS\Extbase\Persistence\QueryInterface$query
Returns
‪int

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

Definition at line 189 of file Backend.php.

◆ getObjectDataByQuery()

array TYPO3\CMS\Extbase\Persistence\Generic\Backend::getObjectDataByQuery ( 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 200 of file Backend.php.

◆ getPlainValue()

int string null TYPO3\CMS\Extbase\Persistence\Generic\Backend::getPlainValue (   $input,
ColumnMap  $columnMap = null 
)
protected

Returns a plain value

i.e. objects are flattened out if possible. Checks explicitly for null values as DataMapper's getPlainValue would convert this to 'NULL'

Parameters
mixed$input‪The value that will be converted
ColumnMap$columnMap‪Optional column map for retrieving the date storage format
Returns
‪int|string|null

Definition at line 1041 of file Backend.php.

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

◆ getQomFactory()

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

Returns the current QOM factory

Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory

Definition at line 168 of file Backend.php.

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

◆ getReflectionService()

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

Returns the reflection service

Returns
‪\TYPO3\CMS\Extbase\Reflection\ReflectionService

Definition at line 178 of file Backend.php.

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

◆ getRemovedChildObjects()

array TYPO3\CMS\Extbase\Persistence\Generic\Backend::getRemovedChildObjects ( 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$object‪The object
string$propertyName
Returns
‪array An array of removed objects

Definition at line 468 of file Backend.php.

References TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_getCleanProperty(), and TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_getProperty().

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

◆ getSession()

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

Returns the repository session

Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Session

Definition at line 158 of file Backend.php.

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

◆ getUidOfAlreadyPersistedValueObject()

int null TYPO3\CMS\Extbase\Persistence\Generic\Backend::getUidOfAlreadyPersistedValueObject ( 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$object‪The object to be tested
Returns
‪int|null The matching uid if an object was found, else null

Definition at line 682 of file Backend.php.

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

◆ insertObject()

◆ insertRelationInRelationtable()

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

Inserts mm-relation into a relation table

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object‪The related object
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObject‪The parent object
string$propertyName‪The name of the parent object's property where the related objects are stored in
int$sortingPosition‪Defaults to NULL
Returns
‪int The uid of the inserted row

Definition at line 696 of file Backend.php.

References TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_getProperty(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\determineStoragePageIdForNewRecord(), and TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\getUid().

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

◆ isNewObject()

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

Checks if the given object has ever been persisted.

Parameters
object$object‪The object to check
Returns
‪bool TRUE if the object is new, FALSE if the object exists in the repository

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

Definition at line 255 of file Backend.php.

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

◆ persistObject()

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

◆ persistObjects()

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

Traverse and persist all aggregate roots and their object graph.

Definition at line 302 of file Backend.php.

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

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

◆ persistObjectStorage()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::persistObjectStorage ( ObjectStorage  $objectStorage,
DomainObjectInterface  $parentObject,
  $propertyName,
array &  $row 
)
protected

Persists an object storage. Objects of a 1:n or m:n relation are queued and processed with the parent object. A 1:1 relation gets persisted immediately. Objects which were removed from the property were detached from the parent object. They will not be deleted by default. You have to annotate the property with '@TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")' if you want them to be deleted as well.

Parameters
\TYPO3\CMS\Extbase\Persistence\ObjectStorage$objectStorage‪The object storage to be persisted.
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObject‪The parent object. One of the properties holds the object storage.
string$propertyName‪The name of the property holding the object storage.
array$row‪The row array of the parent object to be persisted. It's passed by reference and gets filled with either a comma separated list of uids (csv) or the number of contained objects.

Definition at line 404 of file Backend.php.

References TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\_getCleanProperty(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\attachObjectToParentObject(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\detachObjectFromParentObject(), TYPO3\CMS\Extbase\Persistence\ObjectStorage\getPosition(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\getRemovedChildObjects(), TYPO3\CMS\Extbase\Persistence\Generic\Backend\insertObject(), TYPO3\CMS\Extbase\Persistence\ObjectStorage\isRelationDirty(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\RELATION_HAS_MANY, TYPO3\CMS\Extbase\Persistence\Generic\Backend\removeEntity(), and TYPO3\CMS\Extbase\Persistence\Generic\Backend\updateRelationOfObjectToParentObject().

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

◆ processDeletedObjects()

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

Iterate over deleted aggregate root objects and process them

Definition at line 925 of file Backend.php.

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

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

◆ propertyValueIsLazyLoaded()

bool TYPO3\CMS\Extbase\Persistence\Generic\Backend::propertyValueIsLazyLoaded (   $propertyValue)
protected

Checks, if the property value is lazy loaded and was not initialized

Parameters
mixed$propertyValue‪The property value
Returns
‪bool

Definition at line 380 of file Backend.php.

◆ removeEntity()

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

◆ removeRelatedObjects()

◆ setAggregateRootObjects()

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

Sets the aggregate root objects

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

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

Definition at line 265 of file Backend.php.

◆ setChangedEntities()

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

Sets the changed objects

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

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

Definition at line 275 of file Backend.php.

◆ setDeletedEntities()

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

Sets the deleted objects

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

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

Definition at line 285 of file Backend.php.

◆ setPersistenceManager()

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

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

Definition at line 148 of file Backend.php.

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

◆ updateObject()

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

◆ updateRelationInRelationTable()

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

Updates mm-relation in a relation table

Parameters
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$object‪The related object
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface$parentObject‪The parent object
string$propertyName‪The name of the parent object's property where the related objects are stored in
int$sortingPosition‪Defaults to NULL
Returns
‪bool TRUE if update was successfully

Definition at line 734 of file Backend.php.

References TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface\getUid().

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

◆ updateRelationOfObjectToParentObject()

TYPO3\CMS\Extbase\Persistence\Generic\Backend::updateRelationOfObjectToParentObject ( DomainObjectInterface  $object,
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
int$sortingPosition

Definition at line 511 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\persistObjectStorage().

Member Data Documentation

◆ $aggregateRootObjects

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

Definition at line 62 of file Backend.php.

◆ $changedEntities

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

Definition at line 70 of file Backend.php.

◆ $configurationManager

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

◆ $dataMapFactory

TYPO3 CMS Extbase Persistence Generic Mapper DataMapFactory TYPO3\CMS\Extbase\Persistence\Generic\Backend::$dataMapFactory
protected

◆ $deletedEntities

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

Definition at line 66 of file Backend.php.

◆ $eventDispatcher

EventDispatcherInterface TYPO3\CMS\Extbase\Persistence\Generic\Backend::$eventDispatcher
protected

◆ $persistenceManager

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

◆ $qomFactory

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

◆ $referenceIndex

TYPO3 CMS Core Database ReferenceIndex TYPO3\CMS\Extbase\Persistence\Generic\Backend::$referenceIndex
protected

The TYPO3 reference index object

Definition at line 96 of file Backend.php.

◆ $reflectionService

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

◆ $session

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

◆ $signalSlotDispatcher

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

Definition at line 104 of file Backend.php.

◆ $storageBackend

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

◆ $visitedDuringPersistence

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

Definition at line 74 of file Backend.php.