function ViewListBuilder::load

Same name in other branches
  1. 9 core/modules/views_ui/src/ViewListBuilder.php \Drupal\views_ui\ViewListBuilder::load()
  2. 8.9.x core/modules/views_ui/src/ViewListBuilder.php \Drupal\views_ui\ViewListBuilder::load()
  3. 11.x core/modules/views_ui/src/ViewListBuilder.php \Drupal\views_ui\ViewListBuilder::load()

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 65

Class

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

Namespace

Drupal\views_ui

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.