public function OpignoActivityListBuilder::buildRow in Opigno module 8
Same name and namespace in other branches
- 3.x src/OpignoActivityListBuilder.php \Drupal\opigno_module\OpignoActivityListBuilder::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/
OpignoActivityListBuilder.php, line 28
Class
- OpignoActivityListBuilder
- Defines a class to build a listing of Activity entities.
Namespace
Drupal\opigno_moduleCode
public function buildRow(EntityInterface $entity) {
/* @var $entity \Drupal\opigno_module\Entity\OpignoActivity */
$row['id'] = $entity
->id();
$row['name'] = Link::createFromRoute($entity
->label(), 'entity.opigno_activity.edit_form', [
'opigno_activity' => $entity
->id(),
]);
return $row + parent::buildRow($entity);
}