public function GroupRoleListBuilder::render in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Controller/GroupRoleListBuilder.php \Drupal\group\Entity\Controller\GroupRoleListBuilder::render()
Builds the entity listing as renderable array for table.html.twig.
@todo Add a link to add a new item to the #empty text.
Overrides DraggableListBuilder::render
File
- src/
Entity/ Controller/ GroupRoleListBuilder.php, line 118
Class
- GroupRoleListBuilder
- Defines a class to build a listing of group role entities.
Namespace
Drupal\group\Entity\ControllerCode
public function render() {
$build = parent::render();
$build['table']['#empty'] = $this
->t('No group roles available. <a href="@link">Add group role</a>.', [
'@link' => Url::fromRoute('entity.group_role.add_form', [
'group_type' => $this->groupType
->id(),
])
->toString(),
]);
return $build;
}