You are here

protected function SimpleSitemap::isIndexable in Simple XML sitemap 4.x

1 call to SimpleSitemap::isIndexable()
SimpleSitemap::generateIndex in src/Entity/SimpleSitemap.php

File

src/Entity/SimpleSitemap.php, line 177

Class

SimpleSitemap
Defines the simple_sitemap entity.

Namespace

Drupal\simple_sitemap\Entity

Code

protected function isIndexable() : bool {
  try {
    \Drupal::entityTypeManager()
      ->getStorage('simple_sitemap')
      ->getChunk($this, self::FETCH_BY_STATUS_UNPUBLISHED, 2);
    return TRUE;
  } catch (SitemapNotExistsException $e) {
    return FALSE;
  }
}