public function CropTypeListBuilder::render in Crop API 8.2
Same name and namespace in other branches
- 8 src/CropTypeListBuilder.php \Drupal\crop\CropTypeListBuilder::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/
CropTypeListBuilder.php, line 128
Class
- CropTypeListBuilder
- Defines a class to build a listing of crop type entities.
Namespace
Drupal\cropCode
public function render() {
$build = parent::render();
$build['table']['#empty'] = t('No crop types available. <a href="@link">Add crop type</a>.', [
'@link' => $this->urlGenerator
->generateFromRoute('crop.type_add'),
]);
return $build;
}