function ViewsSelection::countReferenceableEntities

Same name in other branches
  1. 9 core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php \Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection::countReferenceableEntities()
  2. 8.9.x core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php \Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection::countReferenceableEntities()
  3. 11.x core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php \Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection::countReferenceableEntities()

Overrides SelectionInterface::countReferenceableEntities

File

core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php, line 300

Class

ViewsSelection
Plugin implementation of the 'selection' entity_reference.

Namespace

Drupal\views\Plugin\EntityReferenceSelection

Code

public function countReferenceableEntities($match = NULL, $match_operator = 'CONTAINS') {
    $this->getReferenceableEntities($match, $match_operator);
    return $this->view->pager
        ->getTotalItems();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.