You are here

public function OpignoAnswerListBuilder::buildRow in Opigno module 3.x

Same name and namespace in other branches
  1. 8 src/OpignoAnswerListBuilder.php \Drupal\opigno_module\OpignoAnswerListBuilder::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/OpignoAnswerListBuilder.php, line 28

Class

OpignoAnswerListBuilder
Defines a class to build a listing of Answer entities.

Namespace

Drupal\opigno_module

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\opigno_module\Entity\OpignoAnswer */
  $row['id'] = $entity
    ->id();
  $row['name'] = Link::createFromRoute($entity
    ->id(), 'entity.opigno_answer.edit_form', [
    'opigno_answer' => $entity
      ->id(),
  ]);
  return $row + parent::buildRow($entity);
}