public function WebformSubmissionLogManager::loadByEntities in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_submission_log/src/WebformSubmissionLogManager.php \Drupal\webform_submission_log\WebformSubmissionLogManager::loadByEntities()
Log webform submission logs.
Parameters
\Drupal\Core\Entity\EntityInterface|null $webform_entity: A webform or webform submission entity.
\Drupal\Core\Entity\EntityInterface|null $source_entity: (optional) A webform submission source entity.
\Drupal\Core\Session\AccountInterface $account: The current user account.
array $options: (optional) Additional options and query conditions.
Return value
array An array of webform submission logs. Log entry object includes:
- lid: (int) ID of the log entry.
- sid: (int) Webform submission ID on which the operation was executed.
- uid: (int) UID of the user that executed the operation.
- handler_id: (string) Optional name of the handler that executed the operation.
- operation: (string) Name of the executed operation.
- message: (string) Untranslated message of the executed operation.
- variables: (array) Variables to use whenever message has to be translated.
- data: (array) Data associated with this log entry.
- timestamp: (int) Timestamp when the operation was executed.
Overrides WebformSubmissionLogManagerInterface::loadByEntities
File
- modules/
webform_submission_log/ src/ WebformSubmissionLogManager.php, line 131
Class
- WebformSubmissionLogManager
- Webform submission log manager.
Namespace
Drupal\webform_submission_logCode
public function loadByEntities(EntityInterface $webform_entity = NULL, EntityInterface $source_entity = NULL, AccountInterface $account = NULL, array $options = []) {
$result = $this
->getQuery($webform_entity, $source_entity, $account, $options)
->execute();
$records = [];
while ($record = $result
->fetchObject()) {
$record->variables = unserialize($record->variables);
$record->data = unserialize($record->data);
$records[] = $record;
}
return $records;
}