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.

Overrides ConfigEntityListBuilder::load

File

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

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);
}
doc_Drupal
2016-10-29 08:54:55
Comments
Leave a Comment

Please login to continue.