You are here

protected function RecipientHandlerSelectBase::doCount in Simplenews 8.2

Same name and namespace in other branches
  1. 3.x src/Plugin/simplenews/RecipientHandler/RecipientHandlerSelectBase.php \Drupal\simplenews\Plugin\simplenews\RecipientHandler\RecipientHandlerSelectBase::doCount()

Counts the number of recipients.

Internal count function allowing the caller to perform caching.

Return value

int Number of recipients.

Overrides RecipientHandlerBase::doCount

File

src/Plugin/simplenews/RecipientHandler/RecipientHandlerSelectBase.php, line 32

Class

RecipientHandlerSelectBase
Base for Recipient Handlers that access the database directly using Select.

Namespace

Drupal\simplenews\Plugin\simplenews\RecipientHandler

Code

protected function doCount() {
  return $this
    ->buildRecipientQuery()
    ->countQuery()
    ->execute()
    ->fetchField();
}