protected function WebformNodeReferencesListController::getEntityIds in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_node/src/Controller/WebformNodeReferencesListController.php \Drupal\webform_node\Controller\WebformNodeReferencesListController::getEntityIds()
Loads entity IDs using a pager sorted by the entity id.
Return value
array An array of entity IDs.
Overrides EntityListBuilder::getEntityIds
File
- modules/
webform_node/ src/ Controller/ WebformNodeReferencesListController.php, line 418
Class
- WebformNodeReferencesListController
- Defines a controller for webform node references.
Namespace
Drupal\webform_node\ControllerCode
protected function getEntityIds() {
$query = $this
->getStorage()
->getQuery()
->sort($this->entityType
->getKey('id'));
// Add field names.
$or = $query
->orConditionGroup();
foreach ($this->fieldNames as $field_name) {
$or
->condition($field_name . '.target_id', $this->webform
->id());
}
$query
->condition($or);
// Only add the pager if a limit is specified.
if ($this->limit) {
$query
->pager($this->limit);
}
return $query
->execute();
}