You are here

public function SkinListBuilder::buildRow in Skinr 8.2

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()

1 call to SkinListBuilder::buildRow()
SkinListBuilder::render in skinr_ui/src/Controller/SkinListBuilder.php
Builds the entity listing as renderable array for table.html.twig.

File

skinr_ui/src/Controller/SkinListBuilder.php, line 57
Contains \Drupal\skinr_ui\Controller\SkinListBuilder.

Class

SkinListBuilder
Returns responses for devel module routes.

Namespace

Drupal\skinr_ui\Controller

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = array(
    'data' => $this
      ->getLabel($entity),
  );
  $row['element_type'] = array(
    'data' => $entity
      ->elementTypeLabel(),
    'class' => array(
      'skin-table-filter-text-source',
    ),
  );
  $row['element'] = array(
    'data' => $entity
      ->elementLabel(),
    'class' => array(
      'skin-table-filter-text-source',
    ),
  );
  $row['theme'] = array(
    'data' => $entity
      ->themeLabel(),
    'class' => array(
      'skin-table-filter-text-source',
    ),
  );
  $row['skin'] = array(
    'data' => $entity
      ->skinLabel(),
    'class' => array(
      'skin-table-filter-text-source',
    ),
  );

  // $row['storage'] = $entity->getStorage();
  $row['status'] = $entity
    ->status() ? t('Enabled') : t('Disabled');
  return $row + parent::buildRow($entity);
}