You are here

public function ActionListBuilder::load in Drupal 10

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

Class

ActionListBuilder
Defines a class to build a listing of action entities.

Namespace

Drupal\action

Code

public function load() {
  $entities = parent::load();
  foreach ($entities as $entity) {
    if ($entity
      ->isConfigurable()) {
      $this->hasConfigurableActions = TRUE;
      continue;
    }
  }
  return $entities;
}