You are here

public function RuleListBuilder::load in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Lists/RuleListBuilder.php \Drupal\rng\Lists\RuleListBuilder::load()
  2. 3.x src/Lists/RuleListBuilder.php \Drupal\rng\Lists\RuleListBuilder::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 EntityListBuilder::load

File

src/Lists/RuleListBuilder.php, line 86

Class

RuleListBuilder
Builds a list of rng rules.

Namespace

Drupal\rng\Lists

Code

public function load() {
  if (isset($this->event)) {
    return $this->eventManager
      ->getMeta($this->event)
      ->getRules(NULL, FALSE, NULL);
  }
  return parent::load();
}