You are here

protected function EntityUrlGenerator::isOverwrittenForEntityType in Simple XML sitemap 4.x

Check if another plugin overrides this plugin's generation for given entity type.

Parameters

string $entity_type_name:

Return value

bool

1 call to EntityUrlGenerator::isOverwrittenForEntityType()
EntityUrlGenerator::getDataSets in src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGenerator.php
@inheritdoc

File

src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGenerator.php, line 181

Class

EntityUrlGenerator
Class EntityUrlGenerator

Namespace

Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator

Code

protected function isOverwrittenForEntityType(string $entity_type_name) : bool {
  foreach ($this->urlGeneratorManager
    ->getDefinitions() as $plugin) {
    if (isset($plugin['settings']['overrides_entity_type']) && $plugin['settings']['overrides_entity_type'] === $entity_type_name) {
      return TRUE;
    }
  }
  return FALSE;
}