findBy(['element' => $element], ['timestamp' => $order], $limit, $offset); } /** * Gets the target element associated with the logentry. * @param AbstractLogEntry $logEntry * @return DBElement|null Returns the associated DBElement or null if the log either has no target or the element * was deleted from DB. */ public function getTargetElement(AbstractLogEntry $logEntry): ?DBElement { $class = $logEntry->getTargetClass(); $id = $logEntry->getTargetID(); if ($class === null || $id === null) { return null; } return $this->getEntityManager()->find($class, $id); } }