class PathProcessorSitemapVariantOut in Simple XML sitemap 8.3
Class PathProcessorSitemapVariantOut @package Drupal\simple_sitemap\PathProcessor
Hierarchy
- class \Drupal\simple_sitemap\PathProcessor\PathProcessorSitemapVariantOut implements OutboundPathProcessorInterface
Expanded class hierarchy of PathProcessorSitemapVariantOut
1 string reference to 'PathProcessorSitemapVariantOut'
1 service uses PathProcessorSitemapVariantOut
File
- src/
PathProcessor/ PathProcessorSitemapVariantOut.php, line 13
Namespace
Drupal\simple_sitemap\PathProcessorView source
class PathProcessorSitemapVariantOut implements OutboundPathProcessorInterface {
/**
* {@inheritdoc}
*/
public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
$args = explode('/', $path);
if (count($args) === 4 && $args[3] === 'sitemap.xml') {
$path = '/' . $args[2] . '/sitemap.xml';
}
return $path;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PathProcessorSitemapVariantOut:: |
public | function |
Processes the outbound path. Overrides OutboundPathProcessorInterface:: |