public function LayoutBuilderStyleListBuilder::buildRow in Layout Builder Styles 8
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 DraggableListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/LayoutBuilderStyleListBuilder.php, line 33 
Class
- LayoutBuilderStyleListBuilder
- Provides a listing of layout builder style entities.
Namespace
Drupal\layout_builder_stylesCode
public function buildRow(EntityInterface $entity) {
  $row = [];
  $row['label'] = $entity
    ->label();
  $row['id'] = [
    '#plain_text' => $entity
      ->id(),
  ];
  $row['type'] = [
    '#plain_text' => $entity
      ->getType(),
  ];
  return $row + parent::buildRow($entity);
}