public function GroupTypeListBuilder::buildRow in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Controller/GroupTypeListBuilder.php \Drupal\group\Entity\Controller\GroupTypeListBuilder::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/
Entity/ Controller/ GroupTypeListBuilder.php, line 31
Class
- GroupTypeListBuilder
- Defines a class to build a listing of group type entities.
Namespace
Drupal\group\Entity\ControllerCode
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\group\Entity\GroupTypeInterface $entity */
$row['label'] = [
'data' => $entity
->label(),
'class' => [
'menu-label',
],
];
$row['description']['data'] = [
'#markup' => $entity
->getDescription(),
];
return $row + parent::buildRow($entity);
}