function ViewListBuilder::buildHeader

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

Overrides EntityListBuilder::buildHeader

1 call to ViewListBuilder::buildHeader()
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 119

Class

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

Namespace

Drupal\views_ui

Code

public function buildHeader() {
    return [
        'view_name' => [
            'data' => $this->t('View name'),
            '#attributes' => [
                'class' => [
                    'views-ui-name',
                ],
            ],
        ],
        'machine_name' => [
            'data' => $this->t('Machine name'),
            '#attributes' => [
                'class' => [
                    'views-ui-machine-name',
                ],
            ],
        ],
        'description' => [
            'data' => $this->t('Description'),
            '#attributes' => [
                'class' => [
                    'views-ui-description',
                ],
            ],
        ],
        'displays' => [
            'data' => $this->t('Displays'),
            '#attributes' => [
                'class' => [
                    'views-ui-displays',
                ],
            ],
        ],
        'operations' => [
            'data' => $this->t('Operations'),
            '#attributes' => [
                'class' => [
                    'views-ui-operations',
                ],
            ],
        ],
    ];
}

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