You are here

protected function Simplesitemap::getVariants in Simple XML sitemap 8.3

Gets the currently set variants, the default variant, or all variants.

Parameters

bool $default_get_all: If true and no variants are set, all variants are returned. If false and no variants are set, only the default variant is returned.

Return value

array

13 calls to Simplesitemap::getVariants()
Simplesitemap::addCustomLink in src/Simplesitemap.php
Stores a custom path along with its settings to configuration for the currently set variants.
Simplesitemap::fetchSitemapVariantInfo in src/Simplesitemap.php
Fetches info about all published sitemap variants and their chunks.
Simplesitemap::getBundleSettings in src/Simplesitemap.php
Gets settings for bundle or non-bundle entity types. This is done for the currently set variants.
Simplesitemap::getCustomLinks in src/Simplesitemap.php
Gets custom link settings for the currently set variants.
Simplesitemap::getEntityInstanceSettings in src/Simplesitemap.php
Gets sitemap settings for an entity instance which overrides bundle settings, or gets bundle settings, if they are not overridden. This is done for the currently set variant. Please note, this method takes only the first set variant into account. See…

... See full list

File

src/Simplesitemap.php, line 240

Class

Simplesitemap
Class Simplesitemap @package Drupal\simple_sitemap

Namespace

Drupal\simple_sitemap

Code

protected function getVariants($default_get_all = TRUE) {
  if (NULL === $this->variants) {
    $this
      ->setVariants($default_get_all ? TRUE : NULL);
  }
  return $this->variants;
}