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