TYPO3
7.6
|
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 25 of file Backend.php.
__construct | ( | \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface | $configurationManager | ) |
Constructs the backend
\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface | $configurationManager |
Definition at line 147 of file Backend.php.
References Backend\$configurationManager.
|
protected |
Adjustes the common date fields of the given row to the current time
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | |
array | &$row | The row to be updated |
Definition at line 1007 of file Backend.php.
References $GLOBALS.
Referenced by Backend\addCommonFieldsToRow(), and Backend\removeEntity().
|
protected |
Adds common databse fields to a row
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | |
array | &$row |
Definition at line 988 of file Backend.php.
References Backend\addCommonDateFieldsToRow(), and Backend\determineStoragePageIdForNewRecord().
Referenced by Backend\insertObject(), and Backend\updateObject().
|
protected |
Updates the fields defining the relation between the object and the parent object.
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | |
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $parentObject | |
string | $parentPropertyName | |
int | $sortingPosition |
Definition at line 546 of file Backend.php.
References Backend\attachObjectToParentObjectRelationHasMany(), elseif, and Backend\insertRelationInRelationtable().
|
protected |
Updates fields defining the relation between the object and the parent object in relation has-many.
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | |
\TYPO3\CMS\Extbase\DomainObject\AbstractEntity | $parentObject | |
string | $parentPropertyName | |
int | $sortingPosition |
\TYPO3\CMS\Extbase\Persistence\Exception\IllegalRelationTypeException |
Definition at line 587 of file Backend.php.
References Backend\updateObject().
Referenced by Backend\attachObjectToParentObject(), and Backend\updateRelationOfObjectToParentObject().
commit | ( | ) |
Commits the current persistence session.
Implements BackendInterface.
Definition at line 343 of file Backend.php.
References Backend\processDeletedObjects().
|
protected |
Delete all mm-relations of a parent from a relation table
\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 |
Definition at line 836 of file Backend.php.
|
protected |
Delete an mm-relation from a relation table
\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 |
Definition at line 860 of file Backend.php.
Referenced by Backend\detachObjectFromParentObject().
|
protected |
Updates the fields defining the relation between the object and the parent object.
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | |
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $parentObject | |
string | $parentPropertyName |
Definition at line 628 of file Backend.php.
References Backend\deleteRelationFromRelationtable(), elseif, and Backend\updateObject().
|
protected |
Determine the storage page ID for a given NEW record
This does the following:
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object |
Definition at line 1115 of file Backend.php.
Referenced by Backend\addCommonFieldsToRow(), and Backend\insertRelationInRelationtable().
|
protected |
Emits a signal after object data is fetched
\TYPO3\CMS\Extbase\Persistence\QueryInterface | $query | |
array | $result |
Definition at line 250 of file Backend.php.
|
protected |
Emits a signal after an object was added to the storage
DomainObjectInterface | $object |
Definition at line 739 of file Backend.php.
Referenced by Backend\insertObject().
|
protected |
Emits a signal after an object was persisted
DomainObjectInterface | $object |
Definition at line 976 of file Backend.php.
Referenced by Backend\persistObject().
|
protected |
Emits a signal after an object was removed from storage
DomainObjectInterface | $object |
Definition at line 1072 of file Backend.php.
Referenced by Backend\removeEntity().
|
protected |
Emits a signal after an object was updated in storage
DomainObjectInterface | $object |
Definition at line 966 of file Backend.php.
Referenced by Backend\updateObject().
|
protected |
Emits a signal before object data is fetched
\TYPO3\CMS\Extbase\Persistence\QueryInterface | $query |
Definition at line 237 of file Backend.php.
Referenced by Backend\getObjectDataByQuery().
|
protected |
Emits a signal after an object was registered in persistence session This signal replaces the afterInsertObject signal which is now deprecated
DomainObjectInterface | $object |
Definition at line 750 of file Backend.php.
Referenced by Backend\insertObject().
|
protected |
Fetches maximal value currently used for sorting field in parent table
\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 |
\TYPO3\CMS\Extbase\Persistence\Exception\IllegalRelationTypeException |
Definition at line 885 of file Backend.php.
References elseif.
getDataMapper | ( | ) |
Returns the Data Mapper
Definition at line 179 of file Backend.php.
References Backend\$dataMapper.
getIdentifierByObject | ( | $object | ) |
Returns the (internal) identifier for the object, if it is known to the backend. Otherwise NULL is returned.
object | $object |
Implements BackendInterface.
Definition at line 263 of file Backend.php.
Referenced by Backend\isNewObject().
getObjectByIdentifier | ( | $identifier, | |
$className | |||
) |
Returns the object with the (internal) identifier, if it is known to the backend. Otherwise NULL is returned.
string | $identifier | |
string | $className |
Implements BackendInterface.
Definition at line 282 of file Backend.php.
getObjectCountByQuery | ( | \TYPO3\CMS\Extbase\Persistence\QueryInterface | $query | ) |
Returns the number of records matching the query.
\TYPO3\CMS\Extbase\Persistence\QueryInterface | $query |
Implements BackendInterface.
Definition at line 211 of file Backend.php.
getObjectDataByQuery | ( | \TYPO3\CMS\Extbase\Persistence\QueryInterface | $query | ) |
Returns the object data matching the $query.
\TYPO3\CMS\Extbase\Persistence\QueryInterface | $query |
Implements BackendInterface.
Definition at line 223 of file Backend.php.
References Backend\emitBeforeGettingObjectDataSignal().
getQomFactory | ( | ) |
Returns the current QOM factory
Definition at line 189 of file Backend.php.
References Backend\$qomFactory.
getReflectionService | ( | ) |
Returns the reflection service
Definition at line 199 of file Backend.php.
References Backend\$reflectionService.
|
protected |
Returns the removed objects determined by a comparison of the clean property value with the actual property value.
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | The object |
string | $propertyName |
Definition at line 522 of file Backend.php.
getSession | ( | ) |
Returns the repository session
Definition at line 169 of file Backend.php.
References Backend\$session.
|
protected |
Tests, if the given Value Object already exists in the storage backend and if so, it returns the uid.
\TYPO3\CMS\Extbase\DomainObject\AbstractValueObject | $object | The object to be tested |
Definition at line 761 of file Backend.php.
Referenced by Backend\insertObject().
injectDataMapper | ( | \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper | $dataMapper | ) |
\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper | $dataMapper |
Definition at line 129 of file Backend.php.
References Backend\$dataMapper.
injectQomFactory | ( | \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory | $qomFactory | ) |
\TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory | $qomFactory |
Definition at line 113 of file Backend.php.
References Backend\$qomFactory.
injectReflectionService | ( | \TYPO3\CMS\Extbase\Reflection\ReflectionService | $reflectionService | ) |
\TYPO3\CMS\Extbase\Reflection\ReflectionService | $reflectionService |
Definition at line 105 of file Backend.php.
References Backend\$reflectionService.
injectSession | ( | \TYPO3\CMS\Extbase\Persistence\Generic\Session | $session | ) |
\TYPO3\CMS\Extbase\Persistence\Generic\Session | $session |
Definition at line 97 of file Backend.php.
References Backend\$session.
injectSignalSlotDispatcher | ( | \TYPO3\CMS\Extbase\SignalSlot\Dispatcher | $signalSlotDispatcher | ) |
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher | $signalSlotDispatcher |
Definition at line 137 of file Backend.php.
References Backend\$signalSlotDispatcher.
injectStorageBackend | ( | \TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface | $storageBackend | ) |
\TYPO3\CMS\Extbase\Persistence\Generic\Storage\BackendInterface | $storageBackend |
Definition at line 121 of file Backend.php.
References Backend\$storageBackend.
|
protected |
Inserts an object in the storage backend
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | The object to be insterted in the storage |
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $parentObject | The parentobject. |
string | $parentPropertyName |
Definition at line 666 of file Backend.php.
References Backend\addCommonFieldsToRow(), elseif, Backend\emitAfterInsertObjectSignal(), Backend\emitEndInsertObjectSignal(), Backend\getUidOfAlreadyPersistedValueObject(), Backend\propertyValueIsLazyLoaded(), ColumnMap\RELATION_HAS_ONE, and ColumnMap\RELATION_NONE.
Referenced by Backend\persistObject().
|
protected |
Inserts mm-relation into a relation table
\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 |
Definition at line 775 of file Backend.php.
References Backend\determineStoragePageIdForNewRecord().
Referenced by Backend\attachObjectToParentObject().
isNewObject | ( | $object | ) |
Checks if the given object has ever been persisted.
object | $object | The object to check |
Implements BackendInterface.
Definition at line 300 of file Backend.php.
References Backend\getIdentifierByObject().
|
protected |
Persists the given object.
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | The object to be inserted |
Definition at line 375 of file Backend.php.
References elseif, Backend\emitAfterPersistObjectSignal(), Backend\insertObject(), Backend\propertyValueIsLazyLoaded(), and Backend\updateObject().
|
protected |
Iterate over deleted aggregate root objects and process them
Definition at line 1023 of file Backend.php.
References Backend\removeEntity().
Referenced by Backend\commit().
|
protected |
Checks, if the property value is lazy loaded and was not initialized
mixed | $propertyValue | The property value |
Definition at line 436 of file Backend.php.
Referenced by Backend\insertObject(), and Backend\persistObject().
|
protected |
Deletes an object
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | The object to be removed from the storage |
bool | $markAsDeleted | Whether to just flag the row deleted (default) or really delete it |
Definition at line 1042 of file Backend.php.
References Backend\addCommonDateFieldsToRow(), Backend\emitAfterRemoveObjectSignal(), and Backend\removeRelatedObjects().
Referenced by Backend\processDeletedObjects(), and Backend\removeRelatedObjects().
|
protected |
Remove related objects
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | The object to scanned for related objects |
Definition at line 1083 of file Backend.php.
References elseif, and Backend\removeEntity().
Referenced by Backend\removeEntity().
setAggregateRootObjects | ( | \TYPO3\CMS\Extbase\Persistence\ObjectStorage | $objects | ) |
Sets the aggregate root objects
\TYPO3\CMS\Extbase\Persistence\ObjectStorage | $objects |
Implements BackendInterface.
Definition at line 311 of file Backend.php.
setChangedEntities | ( | \TYPO3\CMS\Extbase\Persistence\ObjectStorage | $entities | ) |
Sets the changed objects
\TYPO3\CMS\Extbase\Persistence\ObjectStorage | $entities |
Implements BackendInterface.
Definition at line 322 of file Backend.php.
setDeletedEntities | ( | \TYPO3\CMS\Extbase\Persistence\ObjectStorage | $entities | ) |
Sets the deleted objects
\TYPO3\CMS\Extbase\Persistence\ObjectStorage | $entities |
Implements BackendInterface.
Definition at line 333 of file Backend.php.
setPersistenceManager | ( | \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface | $persistenceManager | ) |
\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface | $persistenceManager |
Implements BackendInterface.
Definition at line 159 of file Backend.php.
References Backend\$persistenceManager.
|
protected |
Updates a given object in the storage
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | The object to be updated |
array | $row | Row to be stored |
Definition at line 939 of file Backend.php.
References Backend\addCommonFieldsToRow(), and Backend\emitAfterUpdateObjectSignal().
Referenced by Backend\attachObjectToParentObjectRelationHasMany(), Backend\detachObjectFromParentObject(), and Backend\persistObject().
|
protected |
Updates mm-relation in a relation table
\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 |
Definition at line 809 of file Backend.php.
Referenced by Backend\updateRelationOfObjectToParentObject().
|
protected |
Updates the fields defining the relation between the object and the parent object.
\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface | $object | |
\TYPO3\CMS\Extbase\DomainObject\AbstractEntity | $parentObject | |
string | $parentPropertyName | |
int | $sortingPosition |
Definition at line 566 of file Backend.php.
References Backend\attachObjectToParentObjectRelationHasMany(), elseif, and Backend\updateRelationInRelationTable().
|
protected |
Definition at line 40 of file Backend.php.
|
protected |
Definition at line 50 of file Backend.php.
|
protected |
Definition at line 87 of file Backend.php.
Referenced by Backend\__construct().
|
protected |
Definition at line 75 of file Backend.php.
Referenced by Backend\getDataMapper(), and Backend\injectDataMapper().
|
protected |
Definition at line 45 of file Backend.php.
|
protected |
Definition at line 35 of file Backend.php.
Referenced by Backend\setPersistenceManager().
|
protected |
Definition at line 65 of file Backend.php.
Referenced by Backend\getQomFactory(), and Backend\injectQomFactory().
|
protected |
Definition at line 82 of file Backend.php.
|
protected |
Definition at line 60 of file Backend.php.
Referenced by Backend\getReflectionService(), and Backend\injectReflectionService().
|
protected |
Definition at line 30 of file Backend.php.
Referenced by Backend\getSession(), and Backend\injectSession().
|
protected |
Definition at line 92 of file Backend.php.
Referenced by Backend\injectSignalSlotDispatcher().
|
protected |
Definition at line 70 of file Backend.php.
Referenced by Backend\injectStorageBackend().
|
protected |
Definition at line 55 of file Backend.php.