You are here

function simple_sitemap_entity_bundle_delete in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 8.2 simple_sitemap.module \simple_sitemap_entity_bundle_delete()
  2. 4.x 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 217
Main module file containing hooks.

Code

function simple_sitemap_entity_bundle_delete($entity_type_id, $bundle) {

  /** @var \Drupal\simple_sitemap\Simplesitemap $generator */
  $generator = \Drupal::service('simple_sitemap.generator');
  $generator
    ->setVariants(TRUE)
    ->removeBundleSettings($entity_type_id, $bundle);
}