ViewListBuilder::buildRow

public ViewListBuilder::buildRow(EntityInterface $view)

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

See also

\Drupal\Core\Entity\EntityListBuilder::render()

File

core/modules/views_ui/src/ViewListBuilder.php, line 86

Class

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

Namespace

Drupal\views_ui

Code

public function buildRow(EntityInterface $view) {
  $row = parent::buildRow($view);
  return array(
    'data' => array(
      'view_name' => array(
        'data' => array(
          '#theme' => 'views_ui_view_info',
          '#view' => $view,
          '#displays' => $this->getDisplaysList($view)
        ),
      ),
      'description' => array(
        'data' => array(
          '#plain_text' => $view->get('description'),
        ),
        'data-drupal-selector' => 'views-table-filter-text-source',
      ),
      'tag' => array(
        'data' => array(
          '#plain_text' => $view->get('tag'),
        ),
        'data-drupal-selector' => 'views-table-filter-text-source',
      ),
      'path' => array(
        'data' => array(
          '#theme' => 'item_list',
          '#items' => $this->getDisplayPaths($view),
          '#context' => ['list_style' => 'comma-list'],
        ),
      ),
      'operations' => $row['operations'],
    ),
    'title' => $this->t('Machine name: @name', array('@name' => $view->id())),
    'class' => array($view->status() ? 'views-ui-list-enabled' : 'views-ui-list-disabled'),
  );
}
doc_Drupal
2016-10-29 09:54:37
Comments
Leave a Comment

Please login to continue.