protected function ViewsSelection::getDisplayExecutionResults in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php \Drupal\views\Plugin\EntityReferenceSelection\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 266
Class
- ViewsSelection
- Plugin implementation of the 'selection' entity_reference.
Namespace
Drupal\views\Plugin\EntityReferenceSelectionCode
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;
}