public function MicrositeListBuilder::buildRow in Entity Reference Hierarchy 8.2
Same name and namespace in other branches
- 3.x modules/entity_hierarchy_microsite/src/MicrositeListBuilder.php \Drupal\entity_hierarchy_microsite\MicrositeListBuilder::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
- modules/
entity_hierarchy_microsite/ src/ MicrositeListBuilder.php, line 26
Class
- MicrositeListBuilder
- Defines a class for a list builder for microsite entities.
Namespace
Drupal\entity_hierarchy_micrositeCode
public function buildRow(EntityInterface $entity) {
return [
'name' => $entity
->toLink(NULL, 'edit-form'),
'home' => $entity
->getHome() ? $entity
->getHome()
->toLink() : $this
->t('N/A'),
] + parent::buildRow($entity);
}