function simple_sitemap_entity_bundle_delete in Simple XML sitemap 4.x
Same name and namespace in other branches
- 8.3 simple_sitemap.module \simple_sitemap_entity_bundle_delete()
- 8.2 simple_sitemap.module \simple_sitemap_entity_bundle_delete()
Implements hook_entity_bundle_delete().
Removes settings of the removed bundle.
Parameters
string $entity_type_id:
string $bundle:
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- ./
simple_sitemap.module, line 220 - Main module file containing hooks.
Code
function simple_sitemap_entity_bundle_delete($entity_type_id, $bundle) {
/** @var \Drupal\simple_sitemap\Manager\Generator $generator */
$generator = \Drupal::service('simple_sitemap.generator');
$generator
->setVariants(TRUE)
->entityManager()
->removeBundleSettings($entity_type_id, $bundle);
}