You are here

public function Simplesitemap::bundleIsIndexed in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 8.2 src/Simplesitemap.php \Drupal\simple_sitemap\Simplesitemap::bundleIsIndexed()

Checks if an entity bundle (or a non-bundle entity type) is set to be indexed for any of the currently set variants.

Parameters

string $entity_type_id:

string|null $bundle_name:

Return value

bool

File

src/Simplesitemap.php, line 830

Class

Simplesitemap
Class Simplesitemap @package Drupal\simple_sitemap

Namespace

Drupal\simple_sitemap

Code

public function bundleIsIndexed($entity_type_id, $bundle_name = NULL) {
  foreach ($this
    ->getBundleSettings($entity_type_id, $bundle_name, FALSE, TRUE) as $settings) {
    if (!empty($settings['index'])) {
      return TRUE;
    }
  }
  return FALSE;
}