3 namespace Drupal\{{ machine_name }}\PathProcessor;
5 use Drupal\Core\PathProcessor\InboundPathProcessorInterface;
6 use Drupal\Core\PathProcessor\OutboundPathProcessorInterface;
7 use Drupal\Core\Render\BubbleableMetadata;
8 use Symfony\Component\HttpFoundation\Request;
11 * Path processor to replace 'node' with 'content' in URLs.
13 class {{ class }} implements InboundPathProcessorInterface, OutboundPathProcessorInterface {
18 public function processInbound($path, Request $request) {
19 return preg_replace('#^/content/#', '/node/', $path);
25 public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
26 return preg_replace('#^/node/#', '/content/', $path);