You are here

public function Settings::save in Simple XML sitemap 4.x

Stores a specific sitemap setting in configuration.

Parameters

string $name: Setting name, like 'max_links'.

mixed $setting: The setting to be saved.

Return value

$this

File

src/Settings.php, line 62

Class

Settings
Class Settings

Namespace

Drupal\simple_sitemap

Code

public function save(string $name, $setting) : Settings {
  $this->configFactory
    ->getEditable('simple_sitemap.settings')
    ->set($name, $setting)
    ->save();
  return $this;
}