protected function SubscriptionListBuilder::getEntityIds in Mailing List 8
Loads entity IDs using a pager sorted by the entity id.
Return value
array An array of entity IDs.
Overrides EntityListBuilder::getEntityIds
File
- src/
SubscriptionListBuilder.php, line 177
Class
- SubscriptionListBuilder
- Defines a class to build a listing of subscriptions.
Namespace
Drupal\mailing_listCode
protected function getEntityIds() {
$query = $this
->getStorage()
->getQuery()
->sort($this->entityType
->getKey('id'));
// Filter by email address for anonymous users when come from a hashed
// access link.
if ($this->currentUser
->isAnonymous() && ($sid = $this->requestStack
->getMasterRequest()
->get('mailing_list_subscription')) && ($subscription = $this
->getStorage()
->load($sid))) {
$query
->condition('email', $subscription
->getEmail());
}
// Only add the pager if a limit is specified.
if ($this->limit) {
$query
->pager($this->limit);
}
return $query
->execute();
}