You are here

public function FilterFormatListBuilder::load in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/filter/src/FilterFormatListBuilder.php \Drupal\filter\FilterFormatListBuilder::load()
  2. 10 core/modules/filter/src/FilterFormatListBuilder.php \Drupal\filter\FilterFormatListBuilder::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/filter/src/FilterFormatListBuilder.php, line 81

Class

FilterFormatListBuilder
Defines a class to build a listing of filter format entities.

Namespace

Drupal\filter

Code

public function load() {

  // Only list enabled filters.
  return array_filter(parent::load(), function ($entity) {
    return $entity
      ->status();
  });
}