You are here

public function EntityExtraFieldListBuilder::buildRow in Entity Extra Field 8

Same name and namespace in other branches
  1. 2.0.x src/Controller/EntityExtraFieldListBuilder.php \Drupal\entity_extra_field\Controller\EntityExtraFieldListBuilder::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/EntityExtraFieldListBuilder.php, line 81

Class

EntityExtraFieldListBuilder
Define entity extra field list builder.

Namespace

Drupal\entity_extra_field\Controller

Code

public function buildRow(EntityInterface $entity) {
  return [
    'label' => $entity
      ->label(),
    'field_type' => $entity
      ->getFieldTypeLabel(),
    'display_type' => $entity
      ->getDisplayType(),
  ] + parent::buildRow($entity);
}