You are here

protected function WebformEntityListBuilderSortLabelTrait::getEntityIds in Webform 6.x

Loads entity IDs using a pager sorted by the entity label (instead of id).

Return value

array An array of entity IDs.

See also

\Drupal\Core\Entity\EntityListBuilder::getEntityIds

1 call to WebformEntityListBuilderSortLabelTrait::getEntityIds()
WebformAccessGroupListBuilder::load in modules/webform_access/src/WebformAccessGroupListBuilder.php
Loads entities of this type from storage for listing.
3 methods override WebformEntityListBuilderSortLabelTrait::getEntityIds()
WebformImageSelectImagesListBuilder::getEntityIds in modules/webform_image_select/src/WebformImageSelectImagesListBuilder.php
Loads entity IDs using a pager sorted by the entity label (instead of id).
WebformOptionsCustomListBuilder::getEntityIds in modules/webform_options_custom/src/WebformOptionsCustomListBuilder.php
Loads entity IDs using a pager sorted by the entity label (instead of id).
WebformOptionsListBuilder::getEntityIds in src/WebformOptionsListBuilder.php
Loads entity IDs using a pager sorted by the entity label (instead of id).

File

src/EntityListBuilder/WebformEntityListBuilderSortLabelTrait.php, line 18

Class

WebformEntityListBuilderSortLabelTrait
Trait class for Webform Entity List Builder sorting by label.

Namespace

Drupal\webform\EntityListBuilder

Code

protected function getEntityIds() {
  $query = $this
    ->getStorage()
    ->getQuery()
    ->sort($this->entityType
    ->getKey('label'));

  // Only add the pager if a limit is specified.
  if ($this->limit) {
    $query
      ->pager($this->limit);
  }
  return $query
    ->execute();
}