You are here

public function BusinessRulesViewsSelection::countReferenceableEntities in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Plugin/EntityReferenceSelection/BusinessRulesViewsSelection.php \Drupal\business_rules\Plugin\EntityReferenceSelection\BusinessRulesViewsSelection::countReferenceableEntities()

Counts entities that are referenceable.

Return value

int The number of referenceable entities.

Overrides SelectionInterface::countReferenceableEntities

File

src/Plugin/EntityReferenceSelection/BusinessRulesViewsSelection.php, line 457

Class

BusinessRulesViewsSelection
Plugin override of the 'selection' entity_reference.

Namespace

Drupal\business_rules\Plugin\EntityReferenceSelection

Code

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