public function SimpleAccessGroupListBuilder::buildRow in Simple Access 8.3
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/
Controller/ SimpleAccessGroupListBuilder.php, line 38
Class
Namespace
Drupal\simple_access\ControllerCode
public function buildRow(EntityInterface $entity) {
$row = [];
$row['label'] = $entity
->label();
$row['roles'] = [
'#type' => 'markup',
'#markup' => implode(', ', array_intersect_key(user_role_names(), array_filter($entity->roles))),
];
return $row + parent::buildRow($entity);
}