You are here

public function CountryListBuilder::render in Ubercart 8.4

Adds some descriptive text to our entity list.

Return value

array Renderable array.

Overrides EntityListBuilder::render

File

uc_country/src/CountryListBuilder.php, line 64

Class

CountryListBuilder
Provides a listing of countries.

Namespace

Drupal\uc_country

Code

public function render() {
  $build['description'] = [
    '#markup' => $this
      ->t("<p>This is a list of the countries currently" . " defined for use on your Drupal site. This country data adheres to" . " the @iso standard for country and zone naming used by payment" . " providers and package couriers.</p>" . "<p>To make a country available for use at checkout or in a user's" . " address book, 'Enable' the country using the widget in the" . " 'Operations' for that country. You may also 'Disable' a country to" . " prevent customers from selecting that country as a billing or" . " shipping address.</p>" . "<p>You may also use the 'Edit' widget in the 'Operations' column to" . " edit a country's name or address format.</p>", [
      '@iso' => Link::fromTextAndUrl('ISO 3166', Url::fromUri('http://en.wikipedia.org/wiki/ISO_3166'))
        ->toString(),
    ]),
  ];
  $build += parent::render();
  $build['table']['#empty'] = $this
    ->t('No countries have been configured yet.');
  return $build;
}