Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ViewsSelection.php

function ViewsSelection::getDisplayExecutionResults

Fetches the results of executing the display.

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".

int $limit: Limit the query to a given number of items. Defaults to 0, which indicates no limiting.

array|null $ids: Array of entity IDs. Defaults to NULL.

Return value

array The results.

2 calls to ViewsSelection::getDisplayExecutionResults()
ViewsSelection::getReferenceableEntities in core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php
Gets the list of referenceable entities.
ViewsSelection::validateReferenceableEntities in core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php
Validates which existing entities can be referenced.

File

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

Class

ViewsSelection
Plugin implementation of the 'selection' entity_reference.

Namespace

Drupal\views\Plugin\EntityReferenceSelection

Code

protected function getDisplayExecutionResults(?string $match = NULL, string $match_operator = 'CONTAINS', int $limit = 0, ?array $ids = NULL) {
    $display_name = $this->getConfiguration()['view']['display_name'];
    $arguments = $this->getConfiguration()['view']['arguments'];
    $results = [];
    if ($this->initializeView($match, $match_operator, $limit, $ids)) {
        $results = $this->view
            ->executeDisplay($display_name, $arguments);
    }
    return $results;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal