function ViewListBuilder::buildRow
Builds a row for an entity in the entity listing.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list.
Return value
array A render array structure of fields for this entity.
Overrides EntityListBuilder::buildRow
1 call to ViewListBuilder::buildRow()
- 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 83  
Class
- ViewListBuilder
 - Defines a class to build a listing of view entities.
 
Namespace
Drupal\views_uiCode
public function buildRow(EntityInterface $view) {
  $row = parent::buildRow($view);
  return [
    'data' => [
      'view_name' => [
        'data' => [
          '#plain_text' => $view->label(),
        ],
      ],
      'machine_name' => [
        'data' => [
          '#plain_text' => $view->id(),
        ],
      ],
      'description' => [
        'data' => [
          '#plain_text' => $view->get('description'),
        ],
      ],
      'displays' => [
        'data' => [
          '#theme' => 'views_ui_view_displays_list',
          '#displays' => $this->getDisplaysList($view),
        ],
      ],
      'operations' => $row['operations'],
    ],
    '#attributes' => [
      'class' => [
        $view->status() ? 'views-ui-list-enabled' : 'views-ui-list-disabled',
      ],
    ],
  ];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.