You are here

protected function XmlSitemapStorage::doDelete in XML sitemap 8

Same name and namespace in other branches
  1. 2.x src/XmlSitemapStorage.php \Drupal\xmlsitemap\XmlSitemapStorage::doDelete()

Performs storage-specific entity deletion.

Parameters

\Drupal\Core\Entity\EntityInterface[] $entities: An array of entity objects to delete.

Overrides ConfigEntityStorage::doDelete

File

src/XmlSitemapStorage.php, line 65

Class

XmlSitemapStorage
XmlSitemap storage service class.

Namespace

Drupal\xmlsitemap

Code

protected function doDelete($entities) {

  // Delete the auxiliar xmlsitemap data.
  foreach ($entities as $entity) {
    $this->state
      ->delete('xmlsitemap.' . $entity
      ->id());
    xmlsitemap_clear_directory($entity, TRUE);
  }
  parent::doDelete($entities);
}