public function WebformScheduledEmailManager::stats in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_scheduled_email/src/WebformScheduledEmailManager.php \Drupal\webform_scheduled_email\WebformScheduledEmailManager::stats()
Get all the handler's statistics.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: A webform, webform submission, or source entity.
string|null $handler_id: A webform handler id.
Return value
array An array containing the handler waiting, queued, ready, and total submissions.
Overrides WebformScheduledEmailManagerInterface::stats
File
- modules/
webform_scheduled_email/ src/ WebformScheduledEmailManager.php, line 746
Class
- WebformScheduledEmailManager
- Defines the webform scheduled email manager.
Namespace
Drupal\webform_scheduled_emailCode
public function stats(EntityInterface $entity = NULL, $handler_id = NULL) {
return [
WebformScheduledEmailManagerInterface::SUBMISSION_WAITING => $this
->waiting($entity, $handler_id),
WebformScheduledEmailManagerInterface::SUBMISSION_QUEUED => $this
->queued($entity, $handler_id),
WebformScheduledEmailManagerInterface::SUBMISSION_READY => $this
->ready($entity, $handler_id),
WebformScheduledEmailManagerInterface::SUBMISSION_TOTAL => $this
->total($entity, $handler_id),
];
}