TYPO3
7.6
|
Public Member Functions | |
__construct () | |
add ($object) | |
remove ($object) | |
replace ($existingObject, $newObject) | |
update ($modifiedObject) | |
getAddedObjects () | |
getRemovedObjects () | |
findAll () | |
countAll () | |
removeAll () | |
findByUid ($uid) | |
setDefaultOrderings (array $defaultOrderings) | |
setDefaultQuerySettings (\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface $defaultQuerySettings) | |
createQuery () | |
findByIdentifier ($identifier) | |
__call ($method, $arguments) | |
getEntityClassName () | |
Protected Member Functions | |
createDomainObject (array $databaseRow) | |
getWhereClauseForEnabledFields () | |
getEnvironmentMode () | |
getDatabaseConnection () | |
Protected Attributes | |
$table = '' | |
$factory | |
$typeField = '' | |
$type = '' | |
Abstract repository implementing the basic repository methods
Definition at line 20 of file AbstractRepository.php.
__construct | ( | ) |
Creates this object.
Definition at line 45 of file AbstractRepository.php.
__call | ( | $method, | |
$arguments | |||
) |
Magic call method for repository methods.
string | $method | Name of the method |
array | $arguments | The arguments |
\BadMethodCallException |
Definition at line 274 of file AbstractRepository.php.
add | ( | $object | ) |
Adds an object to this repository.
object | $object | The object to add |
Implements RepositoryInterface.
Definition at line 57 of file AbstractRepository.php.
countAll | ( | ) |
Returns the total number objects of this repository.
Implements RepositoryInterface.
Definition at line 151 of file AbstractRepository.php.
|
abstractprotected |
Creates an object managed by this repository.
array | $databaseRow |
Referenced by AbstractRepository\findAll(), and AbstractRepository\findByUid().
createQuery | ( | ) |
Returns a query for objects of this repository
\BadMethodCallException |
Implements RepositoryInterface.
Definition at line 248 of file AbstractRepository.php.
findAll | ( | ) |
Returns all objects of this repository.
Implements RepositoryInterface.
Definition at line 120 of file AbstractRepository.php.
References $GLOBALS, AbstractRepository\createDomainObject(), and AbstractRepository\getWhereClauseForEnabledFields().
findByIdentifier | ( | $identifier | ) |
Finds an object matching the given identifier.
mixed | $identifier | The identifier of the object to find |
Implements RepositoryInterface.
Definition at line 260 of file AbstractRepository.php.
References AbstractRepository\findByUid().
findByUid | ( | $uid | ) |
Finds an object matching the given identifier.
int | $uid | The identifier of the object to find |
\RuntimeException | |
\InvalidArgumentException |
Implements RepositoryInterface.
Definition at line 176 of file AbstractRepository.php.
References $GLOBALS, MathUtility\canBeInterpretedAsInteger(), AbstractRepository\createDomainObject(), and AbstractRepository\getWhereClauseForEnabledFields().
Referenced by AbstractRepository\findByIdentifier().
getAddedObjects | ( | ) |
Returns all objects of this repository add()ed but not yet persisted to the storage layer.
Definition at line 100 of file AbstractRepository.php.
|
protected |
getEntityClassName | ( | ) |
Returns the object type this repository is managing.
Definition at line 285 of file AbstractRepository.php.
|
protected |
Function to return the current TYPO3_MODE. This function can be mocked in unit tests to be able to test frontend behaviour.
Definition at line 296 of file AbstractRepository.php.
Referenced by AbstractRepository\getWhereClauseForEnabledFields().
getRemovedObjects | ( | ) |
Returns an array with objects remove()d from the repository that had been persisted to the storage layer before.
Definition at line 110 of file AbstractRepository.php.
|
protected |
get the WHERE clause for the enabled fields of this TCA table depending on the context
Definition at line 194 of file AbstractRepository.php.
References $GLOBALS, and AbstractRepository\getEnvironmentMode().
Referenced by AbstractRepository\findAll(), AbstractRepository\findByUid(), and StorageRepository\initializeLocalCache().
remove | ( | $object | ) |
Removes an object from this repository.
object | $object | The object to remove |
Implements RepositoryInterface.
Definition at line 68 of file AbstractRepository.php.
removeAll | ( | ) |
Removes all objects of this repository as if remove() was called for all of them.
Implements RepositoryInterface.
Definition at line 162 of file AbstractRepository.php.
replace | ( | $existingObject, | |
$newObject | |||
) |
Replaces an object by another.
object | $existingObject | The existing object |
object | $newObject | The new object |
Definition at line 80 of file AbstractRepository.php.
setDefaultOrderings | ( | array | $defaultOrderings | ) |
Sets the property names to order the result by per default. Expected like this: array( 'foo' => ::ORDER_ASCENDING, 'bar' => ::ORDER_DESCENDING )
array | $defaultOrderings | The property names to order by |
\BadMethodCallException |
Implements RepositoryInterface.
Definition at line 222 of file AbstractRepository.php.
setDefaultQuerySettings | ( | \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface | $defaultQuerySettings | ) |
Sets the default query settings to be used in this repository
\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface | $defaultQuerySettings | The query settings to be used by default |
\BadMethodCallException |
Implements RepositoryInterface.
Definition at line 236 of file AbstractRepository.php.
update | ( | $modifiedObject | ) |
Replaces an existing object with the same identifier by the given object
object | $modifiedObject | The modified object |
Implements RepositoryInterface.
Definition at line 90 of file AbstractRepository.php.
|
protected |
Definition at line 30 of file AbstractRepository.php.
|
protected |
Definition at line 25 of file AbstractRepository.php.
|
protected |
Definition at line 40 of file AbstractRepository.php.
|
protected |
Definition at line 35 of file AbstractRepository.php.