You are here

protected function UrlGeneratorBase::getBatchIterationElements in Simple XML sitemap 8.2

Parameters

mixed $elements:

Return value

array

1 call to UrlGeneratorBase::getBatchIterationElements()
UrlGeneratorBase::generate in src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorBase.php
Called by batch.
2 methods override UrlGeneratorBase::getBatchIterationElements()
EntityMenuLinkContentUrlGenerator::getBatchIterationElements in src/Plugin/simple_sitemap/UrlGenerator/EntityMenuLinkContentUrlGenerator.php
@inheritdoc
EntityUrlGenerator::getBatchIterationElements in src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGenerator.php
@inheritdoc

File

src/Plugin/simple_sitemap/UrlGenerator/UrlGeneratorBase.php, line 395

Class

UrlGeneratorBase
Class UrlGeneratorBase @package Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator

Namespace

Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator

Code

protected function getBatchIterationElements($elements) {
  if ($this
    ->needsInitialization()) {
    $this
      ->initializeBatch(count($elements));
  }
  return $this
    ->isBatch() ? array_slice($elements, $this->context['sandbox']['progress'], $this->batchSettings['batch_process_limit']) : $elements;
}