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