function ContactListBuilder::buildRow
File
-
modules/
content_entity_example/ src/ Entity/ Controller/ ContactListBuilder.php, line 88
Class
- ContactListBuilder
- Provides a list controller for content_entity_example entity.
Namespace
Drupal\content_entity_example\Entity\ControllerCode
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\content_entity_example\Entity\Contact $entity */
$row['id'] = $entity->id();
$row['name'] = $entity->toLink()
->toString();
$row['first_name'] = $entity->first_name->value;
$row['role'] = $entity->role->value;
return $row + parent::buildRow($entity);
}