public function Simplesitemap::getCustomLinks in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 src/Simplesitemap.php \Drupal\simple_sitemap\Simplesitemap::getCustomLinks()
Returns an array of custom paths and their sitemap settings.
Parameters
bool $supplement_default_settings:
Return value
array
3 calls to Simplesitemap::getCustomLinks()
- Simplesitemap::addCustomLink in src/
Simplesitemap.php - Stores a custom path along with its sitemap settings to configuration.
- Simplesitemap::getCustomLink in src/
Simplesitemap.php - Returns settings for a custom path added to the sitemap settings.
- Simplesitemap::removeCustomLink in src/
Simplesitemap.php - Removes a custom path from the sitemap settings.
File
- src/
Simplesitemap.php, line 652
Class
- Simplesitemap
- Class Simplesitemap @package Drupal\simple_sitemap
Namespace
Drupal\simple_sitemapCode
public function getCustomLinks($supplement_default_settings = TRUE) {
$custom_links = $this->configFactory
->get('simple_sitemap.custom')
->get('links');
if ($supplement_default_settings) {
foreach ($custom_links as $i => $link_settings) {
self::supplementDefaultSettings('custom', $link_settings);
$custom_links[$i] = $link_settings;
}
}
return $custom_links !== NULL ? $custom_links : [];
}