public static function Simplesitemap::supplementDefaultSettings in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 src/Simplesitemap.php \Drupal\simple_sitemap\Simplesitemap::supplementDefaultSettings()
Supplements all missing link setting with default values.
Parameters
string $type: 'entity'|'custom'
array &$settings:
array $overrides:
3 calls to Simplesitemap::supplementDefaultSettings()
- FormHelper::displayEntitySettings in src/
Form/ FormHelper.php - Simplesitemap::getCustomLinks in src/
Simplesitemap.php - Returns an array of custom paths and their sitemap settings.
- Simplesitemap::setBundleSettings in src/
Simplesitemap.php - Sets sitemap settings for a non-bundle entity type (e.g. user) or a bundle of an entity type (e.g. page).
File
- src/
Simplesitemap.php, line 479
Class
- Simplesitemap
- Class Simplesitemap @package Drupal\simple_sitemap
Namespace
Drupal\simple_sitemapCode
public static function supplementDefaultSettings($type, &$settings, $overrides = []) {
foreach (self::$allowedLinkSettings[$type] as $allowed_link_setting) {
if (!isset($settings[$allowed_link_setting]) && isset(self::$linkSettingDefaults[$allowed_link_setting])) {
$settings[$allowed_link_setting] = isset($overrides[$allowed_link_setting]) ? $overrides[$allowed_link_setting] : self::$linkSettingDefaults[$allowed_link_setting];
}
}
}