public function PlanTypeListBuilder::render in farmOS 2.x
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
- modules/
core/ plan/ src/ PlanTypeListBuilder.php, line 49
Class
- PlanTypeListBuilder
- Provides a listing of plan type entities.
Namespace
Drupal\planCode
public function render() {
$build = parent::render();
$build['table']['#empty'] = $this
->t('No plan types available. <a href=":link">Add plan type</a>.', [
':link' => Url::fromRoute('entity.plan_type.add_form')
->toString(),
]);
return $build;
}