You are here

public function MeetingResultListBuilder::buildRow in Opigno Moxtra 8

Same name and namespace in other branches
  1. 3.x src/MeetingResultListBuilder.php \Drupal\opigno_moxtra\MeetingResultListBuilder::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/MeetingResultListBuilder.php, line 28

Class

MeetingResultListBuilder
Provides a list controller for opigno_moxtra_meeting_result entity.

Namespace

Drupal\opigno_moxtra

Code

public function buildRow(EntityInterface $entity) {
  if ($user = $entity
    ->getUser()) {

    /* @var \Drupal\opigno_moxtra\MeetingResultInterface $entity */
    $row['id'] = $entity
      ->id();
    $row['meeting'] = $entity
      ->getMeeting()
      ->toLink();
    $row['user'] = $user
      ->toLink();
    $row['status'] = $entity
      ->getStatusString();
    $row['score'] = $entity
      ->getScore();
    return $row + parent::buildRow($entity);
  }
}