You are here

protected function MessagePurgeBase::baseQuery in Message 8

Get a base query.

Parameters

\Drupal\message\MessageTemplateInterface $template: The message template for which to fetch messages.

Return value

\Drupal\Core\Entity\Query\QueryInterface The query object.

2 calls to MessagePurgeBase::baseQuery()
Days::fetch in src/Plugin/MessagePurge/Days.php
Fetch the messages that need to be purged for a given template.
Quota::fetch in src/Plugin/MessagePurge/Quota.php
Fetch the messages that need to be purged for a given template.

File

src/MessagePurgeBase.php, line 96

Class

MessagePurgeBase
Base implementation for MessagePurge plugins.

Namespace

Drupal\message

Code

protected function baseQuery(MessageTemplateInterface $template) {
  return $this->messageQuery
    ->condition('template', $template
    ->id())
    ->sort('created', 'DESC')
    ->sort('mid', 'DESC');
}