You are here

public function ViewListBuilder::load in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views_ui/src/ViewListBuilder.php \Drupal\views_ui\ViewListBuilder::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

1 call to ViewListBuilder::load()
ViewListBuilder::render in core/modules/views_ui/src/ViewListBuilder.php
Builds the entity listing as renderable array for table.html.twig.

File

core/modules/views_ui/src/ViewListBuilder.php, line 72
Contains \Drupal\views_ui\ViewListBuilder.

Class

ViewListBuilder
Defines a class to build a listing of view entities.

Namespace

Drupal\views_ui

Code

public function load() {
  $entities = array(
    'enabled' => array(),
    'disabled' => array(),
  );
  foreach (parent::load() as $entity) {
    if ($entity
      ->status()) {
      $entities['enabled'][] = $entity;
    }
    else {
      $entities['disabled'][] = $entity;
    }
  }
  return $entities;
}