You are here

public function ParagraphsSetListBuilder::buildRow in Paragraphs Sets 8

Same name and namespace in other branches
  1. 8.2 src/Controller/ParagraphsSetListBuilder.php \Drupal\paragraphs_sets\Controller\ParagraphsSetListBuilder::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

See also

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

File

src/Controller/ParagraphsSetListBuilder.php, line 27

Class

ParagraphsSetListBuilder
Provides a listing of ParagraphsSet.

Namespace

Drupal\paragraphs_sets\Controller

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = $entity
    ->label();
  $row['id'] = $entity
    ->id();
  $row['description']['data'] = [
    '#markup' => $entity
      ->getDescription(),
  ];
  return $row + parent::buildRow($entity);
}