You are here

protected function YamlFormSelection::buildEntityQuery in YAML Form 8

Builds an EntityQuery to get referenceable entities.

Parameters

string|null $match: (Optional) Text to match the label against. Defaults to NULL.

string $match_operator: (Optional) The operation the matching should be done with. Defaults to "CONTAINS".

Return value

\Drupal\Core\Entity\Query\QueryInterface The EntityQuery object with the basic conditions and sorting applied to it.

Overrides DefaultSelection::buildEntityQuery

File

src/Plugin/EntityReferenceSelection/YamlFormSelection.php, line 36

Class

YamlFormSelection
Provides specific access control for the yamlform entity type.

Namespace

Drupal\yamlform\Plugin\EntityReferenceSelection

Code

protected function buildEntityQuery($match = NULL, $match_operator = 'CONTAINS') {
  $query = parent::buildEntityQuery($match, $match_operator);

  // Exclude templates.
  $query
    ->condition('template', 0);
  return $query;
}