foreach($generator->getSitemapManager()->getSitemapVariants(NULL,FALSE)as$variant=>$definition){if(isset($values['index_'.$variant.'_'.$f->getEntityTypeId().'_settings'])){// Variants may have changed since form load.$settings=['index'=>(bool)$values['index_'.$variant.'_'.$f->getEntityTypeId().'_settings'],'priority'=>$values['priority_'.$variant.'_'.$f->getEntityTypeId().'_settings'],'changefreq'=>$values['changefreq_'.$variant.'_'.$f->getEntityTypeId().'_settings'],'include_images'=>(bool)$values['include_images_'.$variant.'_'.$f->getEntityTypeId().'_settings'],];$generator->setVariants($variant);switch($f->getEntityCategory()){case'bundle':$generator->setBundleSettings($f->getEntityTypeId(),!empty($f->getBundleName())?$f->getBundleName():$f->getFormEntityId(),$settings);if(empty($settings['index'])){$generator->removeEntityInstanceSettings($f->getEntityTypeId(),$f->getInstanceId());}break;case'instance':$generator->setEntityInstanceSettings($f->getEntityTypeId(),!empty($f->getInstanceId())?$f->getInstanceId():$f->getFormEntityId(),$settings);break;}

/** * Implements hook_ENTITY_TYPE_delete(). * * When a language is removed from the system remove it also from settings. */functionsimple_sitemap_configurable_language_delete(ConfigurableLanguageInterface$language){