public function TypeGroupListBuilder::buildRow in Booking and Availability Management Tools for Drupal 8
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/
TypeGroupListBuilder.php, line 83 - Contains \Drupal\bat\TypeGroupListBuilder.
Class
- TypeGroupListBuilder
- Defines a class to build a listing of Type Group entities.
Namespace
Drupal\batCode
public function buildRow(EntityInterface $entity) {
$row['id'] = $entity
->id();
$row['name'] = Link::fromTextAndUrl($entity
->label(), new Url('entity.bat_type_group.edit_form', [
'bat_type_group' => $entity
->id(),
]));
$row['bundle'] = bat_type_group_bundle_load($entity
->bundle())
->label();
$row['status'] = $entity
->getStatus() ? t('Published') : t('Unpublished');
return $row + parent::buildRow($entity);
}