public function CityListBuilder::render in Country, State and City Fields 8
We override ::render() so that we can add our own content above the table. parent::render() is where EntityListBuilder creates the table using our buildHeader() and buildRow() implementations.
Overrides EntityListBuilder::render
File
- src/
Entity/ Controller/ CityListBuilder.php, line 58
Class
- CityListBuilder
- Provides a list controller for citylist entity.
Namespace
Drupal\country_state_city\Entity\ControllerCode
public function render() {
$build['description'] = [
'#markup' => $this
->t('City Entity implements a City model.'),
];
$build['table'] = parent::render();
\Drupal::service('cache.render')
->invalidateAll();
return $build;
}