public function SimpleSitemapViews::addArgumentsToIndex in Simple XML sitemap 4.x
Same name and namespace in other branches
- 8.3 modules/simple_sitemap_views/src/SimpleSitemapViews.php \Drupal\simple_sitemap_views\SimpleSitemapViews::addArgumentsToIndex()
Adds view arguments to the index.
Parameters
\Drupal\views\ViewExecutable $view: A view executable instance.
array $args: Array of arguments to add to the index.
string|null $display_id: The display id. If empty uses the current display.
Return value
bool TRUE if the arguments are added to the index, FALSE otherwise.
Throws
\Exception
File
- modules/
simple_sitemap_views/ src/ SimpleSitemapViews.php, line 250
Class
- SimpleSitemapViews
- Class to manage sitemap data for views.
Namespace
Drupal\simple_sitemap_viewsCode
public function addArgumentsToIndex(ViewExecutable $view, array $args, ?string $display_id = NULL) : bool {
foreach (SimpleSitemap::loadMultiple() as $variant) {
if ($this
->addArgumentsToIndexByVariant($view, $variant
->id(), $args, $display_id)) {
return TRUE;
}
}
return FALSE;
}