You are here

function xmlsitemap_link_entity_check_enabled in XML sitemap 8

Same name and namespace in other branches
  1. 2.x xmlsitemap.module \xmlsitemap_link_entity_check_enabled()

Check if an entity is enabled and configuration exists for the entity type.

Parameters

string $entity_type_id: Entity type id.

Return value

bool Returns TRUE if bundle is enabled, FALSE otherwise.

2 calls to xmlsitemap_link_entity_check_enabled()
XmlSitemapEntitiesSettingsForm::buildForm in src/Form/XmlSitemapEntitiesSettingsForm.php
Form constructor.
xmlsitemap_views_data_alter in ./xmlsitemap.views.inc
Implements hook_views_data_alter().

File

./xmlsitemap.module, line 2686
xmlsitemap XML sitemap

Code

function xmlsitemap_link_entity_check_enabled($entity_type_id) {
  $configuration = \Drupal::configFactory()
    ->listAll("xmlsitemap.settings.{$entity_type_id}.");
  return !empty($configuration);
}