You are here

protected property NodeSearch::$advanced in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/node/src/Plugin/Search/NodeSearch.php \Drupal\node\Plugin\Search\NodeSearch::advanced

The list of options and info for advanced search filters.

Each entry in the array has the option as the key and for its value, an array that determines how the value is matched in the database query. The possible keys in that array are:

  • column: (required) Name of the database column to match against.
  • join: (optional) Information on a table to join. By default the data is matched against the {node_field_data} table.
  • operator: (optional) OR or AND, defaults to OR.

Type: array

File

core/modules/node/src/Plugin/Search/NodeSearch.php, line 122

Class

NodeSearch
Handles searching for node entities using the Search module index.

Namespace

Drupal\node\Plugin\Search

Code

protected $advanced = [
  'type' => [
    'column' => 'n.type',
  ],
  'language' => [
    'column' => 'i.langcode',
  ],
  'author' => [
    'column' => 'n.uid',
  ],
  'term' => [
    'column' => 'ti.tid',
    'join' => [
      'table' => 'taxonomy_index',
      'alias' => 'ti',
      'condition' => 'n.nid = ti.nid',
    ],
  ],
];