public function BackgroundImageListBuilder::render in Background Image 8
Same name and namespace in other branches
- 2.x src/BackgroundImageListBuilder.php \Drupal\background_image\BackgroundImageListBuilder::render()
- 2.0.x src/BackgroundImageListBuilder.php \Drupal\background_image\BackgroundImageListBuilder::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 EntityListBuilder::render
File
- src/
BackgroundImageListBuilder.php, line 19
Class
- BackgroundImageListBuilder
- Provides a list controller for background_image entity.
Namespace
Drupal\background_imageCode
public function render() {
$build = parent::render();
$build['#attached']['library'][] = 'background_image/admin';
$build['table']['#empty'] = $this
->t('There are no @label to display.', [
'@label' => $this->entityType
->getPluralLabel(),
]);
return $build;
}