You are here

public function SimpleSitemapStorage::hasIndex in Simple XML sitemap 4.x

File

src/Entity/SimpleSitemapStorage.php, line 242

Class

SimpleSitemapStorage

Namespace

Drupal\simple_sitemap\Entity

Code

public function hasIndex(SimpleSitemap $entity, bool $status) : bool {
  try {
    $this
      ->getIdByDelta($entity, self::SITEMAP_INDEX_DELTA, $status);
    return TRUE;
  } catch (SitemapNotExistsException $e) {
    return FALSE;
  }
}