You are here

public function FlagsManager::getList in Flags 8

Get an array of country code => country name pairs, altered by alter hooks.

Return value

array An array of country code => country name pairs.

Overrides FlagsManagerInterface::getList

See also

\Drupal\Core\Locale\CountryManager::getStandardList()

File

src/Flags/FlagsManager.php, line 323

Class

FlagsManager
Provides list of countries.

Namespace

Drupal\flags\Flags

Code

public function getList() {

  // Populate the country list if it is not already populated.
  if (!isset($this->flags)) {
    $this->flags = static::getStandardList();
    $this->moduleHandler
      ->alter('flags', $this->flags);
  }
  return $this->flags;
}