You are here

public function ConfigTranslationFieldListBuilder::load in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/config_translation/src/Controller/ConfigTranslationFieldListBuilder.php \Drupal\config_translation\Controller\ConfigTranslationFieldListBuilder::load()
  2. 10 core/modules/config_translation/src/Controller/ConfigTranslationFieldListBuilder.php \Drupal\config_translation\Controller\ConfigTranslationFieldListBuilder::load()

Loads entities of this type from storage for listing.

This allows the implementation to manipulate the listing, like filtering or sorting the loaded entities.

Return value

\Drupal\Core\Entity\EntityInterface[] An array of entities implementing \Drupal\Core\Entity\EntityInterface indexed by their IDs. Returns an empty array if no matching entities are found.

Overrides ConfigEntityListBuilder::load

File

core/modules/config_translation/src/Controller/ConfigTranslationFieldListBuilder.php, line 108

Class

ConfigTranslationFieldListBuilder
Defines the config translation list builder for field entities.

Namespace

Drupal\config_translation\Controller

Code

public function load() {

  // It is not possible to use the standard load method, because this needs
  // all field entities only for the given baseEntityType.
  $ids = \Drupal::entityQuery('field_config')
    ->condition('id', $this->baseEntityType . '.', 'STARTS_WITH')
    ->execute();
  return $this->storage
    ->loadMultiple($ids);
}