You are here

public function NodeSelection::countMatchingItems in Multi-path autocomplete 8

Counts items that matches against the given string.

Return value

int The number of matching items.

Overrides SelectionBase::countMatchingItems

File

lib/Drupal/mpac/Plugin/mpac/selection/NodeSelection.php, line 28
Contains \Drupal\mpac\Plugin\mpac\selection\NodeSelection.

Class

NodeSelection
Provides specific selection functions for nodes.

Namespace

Drupal\mpac\Plugin\mpac\selection

Code

public function countMatchingItems($match = NULL, $match_operator = 'CONTAINS') {
  $query = $this
    ->buildEntityQuery($match, $match_operator);
  return $query
    ->count()
    ->execute();
}