You are here

public function EntityExportCsvListBuilder::buildRow in Entity Export CSV 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 EntityListBuilder::buildRow

See also

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

File

src/EntityExportCsvListBuilder.php, line 27

Class

EntityExportCsvListBuilder
Provides a listing of Entity export csv entities.

Namespace

Drupal\entity_export_csv

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = $entity
    ->label();
  $row['id'] = $entity
    ->id();
  $row['entity_type_id'] = $entity
    ->getTargetEntityTypeId();
  $row['bundle'] = $entity
    ->getTargetBundle();
  return $row + parent::buildRow($entity);
}