You are here

public function PathSelection::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/PathSelection.php, line 28
Contains \Drupal\mpac\Plugin\mpac\selection\PathSelection.

Class

PathSelection
Provides specific selection functions for nodes.

Namespace

Drupal\mpac\Plugin\mpac\selection

Code

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