You are here

private function PathSelection::buildQuery in Multi-path autocomplete 8

2 calls to PathSelection::buildQuery()
PathSelection::countMatchingItems in lib/Drupal/mpac/Plugin/mpac/selection/PathSelection.php
Counts items that matches against the given string.
PathSelection::getMatchingItems in lib/Drupal/mpac/Plugin/mpac/selection/PathSelection.php
Returns a list of matching items.

File

lib/Drupal/mpac/Plugin/mpac/selection/PathSelection.php, line 57
Contains \Drupal\mpac\Plugin\mpac\selection\PathSelection.

Class

PathSelection
Provides specific selection functions for nodes.

Namespace

Drupal\mpac\Plugin\mpac\selection

Code

private function buildQuery($match = NULL, $match_operator = 'CONTAINS') {
  $query = db_select('url_alias');
  if (isset($match)) {
    $query
      ->condition('alias', '%' . $match . '%', 'LIKE');
  }
  return $query;
}