You are here

trait LinkSettingsTrait in Simple XML sitemap 4.x

Trait LinkSettingsTrait

Hierarchy

File

src/Manager/LinkSettingsTrait.php, line 8

Namespace

Drupal\simple_sitemap\Manager
View 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

Namesort descending Modifiers Type Description Overrides
LinkSettingsTrait::supplementDefaultSettings public static function Supplements all missing link setting with default values.