protected function WebformEntityListBuilder::buildInfo in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformEntityListBuilder.php \Drupal\webform\WebformEntityListBuilder::buildInfo()
Build information summary.
Return value
array A render array representing the information summary.
1 call to WebformEntityListBuilder::buildInfo()
- WebformEntityListBuilder::render in src/
WebformEntityListBuilder.php - Builds the entity listing as renderable array for table.html.twig.
File
- src/
WebformEntityListBuilder.php, line 183
Class
- WebformEntityListBuilder
- Defines a class to build a listing of webform entities.
Namespace
Drupal\webformCode
protected function buildInfo() {
// Display info.
if ($this->currentUser
->hasPermission('administer webform') && ($total = $this
->getTotal($this->keys, $this->category, $this->state))) {
return [
'#markup' => $this
->formatPlural($total, '@count webform', '@count webforms'),
'#prefix' => '<div>',
'#suffix' => '</div>',
];
}
else {
return [];
}
}