trait LinkSettingsTrait in Simple XML sitemap 4.x
Trait LinkSettingsTrait
Hierarchy
- trait \Drupal\simple_sitemap\Manager\LinkSettingsTrait
File
- src/
Manager/ LinkSettingsTrait.php, line 8
Namespace
Drupal\simple_sitemap\ManagerView source
trait LinkSettingsTrait {
/**
* Supplements all missing link setting with default values.
*
* @param array|null &$settings
* @param array $overrides
*/
public static function supplementDefaultSettings(&$settings, array $overrides = []) : void {
foreach (self::$linkSettingDefaults as $setting => $value) {
if (!isset($settings[$setting])) {
$settings[$setting] = $overrides[$setting] ?? $value;
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LinkSettingsTrait:: |
public static | function | Supplements all missing link setting with default values. |