You are here

public function CountryListBuilder::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/CountryListBuilder.php, line 58

Class

CountryListBuilder
Provides a list controller for countrylist entity.

Namespace

Drupal\country_state_city\Entity\Controller

Code

public function render() {
  $build['description'] = [
    '#markup' => $this
      ->t('Country Entity implements a Country model.'),
  ];
  $build['table'] = parent::render();
  \Drupal::service('cache.render')
    ->invalidateAll();
  return $build;
}