public function MeetingListBuilder::buildRow in Opigno Moxtra 8
Same name and namespace in other branches
- 3.x src/MeetingListBuilder.php \Drupal\opigno_moxtra\MeetingListBuilder::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/
MeetingListBuilder.php, line 29
Class
- MeetingListBuilder
- Provides a list controller for opigno_moxtra_meeting entity.
Namespace
Drupal\opigno_moxtraCode
public function buildRow(EntityInterface $entity) {
/* @var \Drupal\opigno_moxtra\MeetingInterface $entity */
$row['id'] = $entity
->id();
$row['name'] = $entity
->toLink(NULL, 'edit-form');
$training = $entity
->getTraining();
$row['training'] = isset($training) ? $entity
->getTraining()
->toLink() : '-';
$date = $entity
->getStartDate();
$row['date'] = !empty($date) ? $date : '-';
return $row + parent::buildRow($entity);
}