function ViewsSelection::validateReferenceableEntities

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php \Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection::validateReferenceableEntities()
  2. 10 core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php \Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection::validateReferenceableEntities()
  3. 11.x core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php \Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection::validateReferenceableEntities()

Overrides SelectionInterface::validateReferenceableEntities

File

core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php, line 308

Class

ViewsSelection
Plugin implementation of the 'selection' entity_reference.

Namespace

Drupal\views\Plugin\EntityReferenceSelection

Code

public function validateReferenceableEntities(array $ids) {
    $entities = $this->getDisplayExecutionResults(NULL, 'CONTAINS', 0, $ids);
    $result = [];
    if ($entities) {
        $result = array_keys($entities);
    }
    return $result;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.