public function DashboardListBuilder::buildRow in Dashboards with Layout Builder 8
Same name and namespace in other branches
- 2.0.x src/Entity/DashboardListBuilder.php \Drupal\dashboards\Entity\DashboardListBuilder::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 DraggableListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/
Entity/ DashboardListBuilder.php, line 66
Class
- DashboardListBuilder
- Class DashboardListBuilder.
Namespace
Drupal\dashboards\EntityCode
public function buildRow(EntityInterface $entity) {
$row = [];
$row['label'] = $entity
->label();
$row['category']['#markup'] = $entity->category;
return $row + parent::buildRow($entity);
}