public function SimpleSitemapType::getUrlGenerators in Simple XML sitemap 4.x
Return value
\Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorInterface[]
Overrides SimpleSitemapTypeInterface::getUrlGenerators
File
- src/
Entity/ SimpleSitemapType.php, line 82
Class
- SimpleSitemapType
- Defines the simple_sitemap entity.
Namespace
Drupal\simple_sitemap\EntityCode
public function getUrlGenerators() : array {
if ($this->urlGenerators === NULL) {
$this->urlGenerators = [];
$url_generator_manager = \Drupal::service('plugin.manager.simple_sitemap.url_generator');
foreach ($this
->get('url_generators') as $generator_id) {
$this->urlGenerators[$generator_id] = $url_generator_manager
->createInstance($generator_id);
}
}
return $this->urlGenerators;
}