You are here

protected function RecipientHandlerEntityBase::doCount in Simplenews 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/simplenews/RecipientHandler/RecipientHandlerEntityBase.php \Drupal\simplenews\Plugin\simplenews\RecipientHandler\RecipientHandlerEntityBase::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/RecipientHandlerEntityBase.php, line 24

Class

RecipientHandlerEntityBase
Base for Recipient Handler classes based on EntityQuery.

Namespace

Drupal\simplenews\Plugin\simplenews\RecipientHandler

Code

protected function doCount() {
  return $this
    ->buildEntityQuery()
    ->count()
    ->execute();
}