protected function WebformAccessGroupListBuilder::buildInfo in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_access/src/WebformAccessGroupListBuilder.php \Drupal\webform_access\WebformAccessGroupListBuilder::buildInfo()
Build information summary.
Return value
array A render array representing the information summary.
1 call to WebformAccessGroupListBuilder::buildInfo()
- WebformAccessGroupListBuilder::render in modules/
webform_access/ src/ WebformAccessGroupListBuilder.php - Builds the entity listing as renderable array for table.html.twig.
File
- modules/
webform_access/ src/ WebformAccessGroupListBuilder.php, line 128
Class
- WebformAccessGroupListBuilder
- Defines a class to build a listing of webform access group entities.
Namespace
Drupal\webform_accessCode
protected function buildInfo() {
$total = $this
->getStorage()
->getQuery()
->count()
->execute();
if (!$total) {
return [];
}
return [
'#markup' => $this
->formatPlural($total, '@total access group', '@total access groups', [
'@total' => $total,
]),
'#prefix' => '<div class="webform-access-group-summary">',
'#suffix' => '</div>',
];
}