public function Quota::fetch in Message 8
Fetch the messages that need to be purged for a given template.
Parameters
\Drupal\message\MessageTemplateInterface $template: The message template to fetch messages for.
Return value
array An array of \Drupal\message\MessageInterface entity IDs.
Overrides MessagePurgeInterface::fetch
File
- src/
Plugin/ MessagePurge/ Quota.php, line 57
Class
- Quota
- Maximal (approximate) amount of messages.
Namespace
Drupal\message\Plugin\MessagePurgeCode
public function fetch(MessageTemplateInterface $template) {
$query = $this
->baseQuery($template);
$result = $query
->range($this->configuration['quota'], 1000000)
->execute();
return $result;
}