You are here

public function Generator::getSetting in Simple XML sitemap 4.x

Returns a specific sitemap setting or a default value if setting does not exist.

Parameters

string $name: Name of the setting, like 'max_links'.

mixed $default: Value to be returned if the setting does not exist in the configuration.

Return value

mixed The current setting from configuration or a default value.

File

src/Manager/Generator.php, line 75

Class

Generator
Main managing service.

Namespace

Drupal\simple_sitemap\Manager

Code

public function getSetting(string $name, $default = FALSE) {
  return $this->settings
    ->get($name, $default);
}