LogEntryRepository extends Repository
Sys log entry repository
This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
Table of Contents
Properties
- $querySettings : QuerySettingsInterface|null
- $defaultOrderings : array<non-empty-string, QueryInterface::ORDER_*>
- $defaultQuerySettings : QuerySettingsInterface
- Override query settings created by extbase natively.
- $objectManager : ObjectManagerInterface
- $objectType : class-string
- $persistenceManager : PersistenceManagerInterface
Methods
- __call() : mixed
- Dispatches magic methods (findBy[Property]())
- __construct() : mixed
- Constructs a new Repository
- add() : mixed
- Adds an object to this repository
- countAll() : int
- Returns the total number objects of this repository.
- createQuery() : QueryInterface
- Returns a query for objects of this repository
- deleteByMessageDetails() : int
- Deletes all messages which have the same message details
- findAll() : QueryResultInterface|array<string|int, mixed>
- Returns all objects of this repository.
- findByConstraint() : QueryResultInterface
- Finds all log entries that match all given constraints.
- findByIdentifier() : object|null
- Finds an object matching the given identifier.
- findByUid() : object|null
- Finds an object matching the given identifier.
- getUsedChannels() : array<string|int, mixed>
- getUsedLevels() : array<string|int, mixed>
- initializeObject() : void
- Initialize some local variables to be used during creation of objects
- injectPersistenceManager() : mixed
- injectQuerySettings() : void
- remove() : mixed
- Removes an object from this repository.
- removeAll() : mixed
- Removes all objects of this repository as if remove() was called for all of them.
- setDefaultOrderings() : mixed
- Sets the property names to order the result by per default.
- setDefaultQuerySettings() : mixed
- Sets the default query settings to be used in this repository.
- update() : mixed
- Replaces an existing object with the same identifier by the given object
- addPageTreeConstraintsToQuery() : void
- Adds constraints for the page(s) to the query; this could be one single page or a whole subtree beneath a given page.
- addUsersAndGroupsToQueryConstraints() : void
- Adds users and groups to the query constraints.
- createQueryConstraints() : array<string|int, ConstraintInterface>
- Create an array of query constraints from constraint object
- getRepositoryClassName() : mixed
- Returns the class name of this class.
Properties
$querySettings
public
QuerySettingsInterface|null
$querySettings
= null
$defaultOrderings
protected
array<non-empty-string, QueryInterface::ORDER_*>
$defaultOrderings
= []
$defaultQuerySettings
Override query settings created by extbase natively.
protected
QuerySettingsInterface
$defaultQuerySettings
Be careful if using this, see the comment on setDefaultQuerySettings()
for more insights.
$objectManager
since v11, will be removed in v12
protected
ObjectManagerInterface
$objectManager
$objectType
protected
class-string
$objectType
$persistenceManager
protected
PersistenceManagerInterface
$persistenceManager
Methods
__call()
Dispatches magic methods (findBy[Property]())
public
__call(non-empty-string $methodName, array<int, mixed> $arguments) : mixed
Parameters
- $methodName : non-empty-string
-
The name of the magic method
- $arguments : array<int, mixed>
-
The arguments of the magic method
Tags
__construct()
Constructs a new Repository
public
__construct(ObjectManagerInterface $objectManager) : mixed
Parameters
- $objectManager : ObjectManagerInterface
add()
Adds an object to this repository
public
add(object $object) : mixed
Parameters
- $object : object
-
The object to add
Tags
countAll()
Returns the total number objects of this repository.
public
countAll() : int
Return values
int —The object count
createQuery()
Returns a query for objects of this repository
public
createQuery() : QueryInterface
Return values
QueryInterfacedeleteByMessageDetails()
Deletes all messages which have the same message details
public
deleteByMessageDetails(LogEntry $logEntry) : int
Parameters
- $logEntry : LogEntry
Return values
intfindAll()
Returns all objects of this repository.
public
findAll() : QueryResultInterface|array<string|int, mixed>
Return values
QueryResultInterface|array<string|int, mixed>findByConstraint()
Finds all log entries that match all given constraints.
public
findByConstraint(Constraint $constraint) : QueryResultInterface
Parameters
- $constraint : Constraint
Return values
QueryResultInterfacefindByIdentifier()
Finds an object matching the given identifier.
public
findByIdentifier(mixed $identifier) : object|null
Parameters
- $identifier : mixed
-
The identifier of the object to find
Return values
object|null —The matching object if found, otherwise NULL
findByUid()
Finds an object matching the given identifier.
public
findByUid(int $uid) : object|null
Parameters
- $uid : int
-
The identifier of the object to find
Return values
object|null —The matching object if found, otherwise NULL
getUsedChannels()
public
getUsedChannels() : array<string|int, mixed>
Return values
array<string|int, mixed>getUsedLevels()
public
getUsedLevels() : array<string|int, mixed>
Return values
array<string|int, mixed>initializeObject()
Initialize some local variables to be used during creation of objects
public
initializeObject() : void
injectPersistenceManager()
public
injectPersistenceManager(PersistenceManagerInterface $persistenceManager) : mixed
Parameters
- $persistenceManager : PersistenceManagerInterface
injectQuerySettings()
public
injectQuerySettings(QuerySettingsInterface $querySettings) : void
Parameters
- $querySettings : QuerySettingsInterface
remove()
Removes an object from this repository.
public
remove(object $object) : mixed
Parameters
- $object : object
-
The object to remove
Tags
removeAll()
Removes all objects of this repository as if remove() was called for all of them.
public
removeAll() : mixed
setDefaultOrderings()
Sets the property names to order the result by per default.
public
setDefaultOrderings(array<non-empty-string, QueryInterface::ORDER_*> $defaultOrderings) : mixed
Expected like this: array( 'foo' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING, 'bar' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING )
Parameters
- $defaultOrderings : array<non-empty-string, QueryInterface::ORDER_*>
-
The property names to order by
setDefaultQuerySettings()
Sets the default query settings to be used in this repository.
public
setDefaultQuerySettings(QuerySettingsInterface $defaultQuerySettings) : mixed
A typical use case is an initializeObject() method that creates a QuerySettingsInterface object, configures it and sets it to be used for all queries created by the repository.
Warning: Using this setter fully overrides native query settings created by QueryFactory->create(). This especially means that storagePid settings from configuration are not applied anymore, if not explicitly set. Make sure to apply these to your own QuerySettingsInterface object if needed, when using this method.
Parameters
- $defaultQuerySettings : QuerySettingsInterface
-
The query settings to be used by default
update()
Replaces an existing object with the same identifier by the given object
public
update(object $modifiedObject) : mixed
Parameters
- $modifiedObject : object
-
The modified object
Tags
addPageTreeConstraintsToQuery()
Adds constraints for the page(s) to the query; this could be one single page or a whole subtree beneath a given page.
protected
addPageTreeConstraintsToQuery(Constraint $constraint, QueryInterface $query, array<string|int, mixed> &$queryConstraints) : void
Parameters
- $constraint : Constraint
- $query : QueryInterface
- $queryConstraints : array<string|int, mixed>
-
the query constraints to add to, will be modified
addUsersAndGroupsToQueryConstraints()
Adds users and groups to the query constraints.
protected
addUsersAndGroupsToQueryConstraints(Constraint $constraint, QueryInterface $query, array<string|int, mixed> &$queryConstraints) : void
Parameters
- $constraint : Constraint
- $query : QueryInterface
- $queryConstraints : array<string|int, mixed>
-
the query constraints to add to, will be modified
createQueryConstraints()
Create an array of query constraints from constraint object
protected
createQueryConstraints(QueryInterface $query, Constraint $constraint) : array<string|int, ConstraintInterface>
Parameters
- $query : QueryInterface
- $constraint : Constraint
Return values
array<string|int, ConstraintInterface>getRepositoryClassName()
Returns the class name of this class.
protected
getRepositoryClassName() : mixed