3 namespace Drupal\front_page;
5 use Drupal\Core\PathProcessor\OutboundPathProcessorInterface;
6 use Drupal\Core\Render\BubbleableMetadata;
7 use Symfony\Component\HttpFoundation\Request;
9 class FrontPagePathProcessor implements OutboundPathProcessorInterface {
14 public function processOutbound($path, &$options = array(), Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
15 if ($path == '/main') {
18 $config = \Drupal::config('front_page.settings');
19 $new_path = $config->get('home_link_path', '');
20 if (($path === '/<front>' || empty($path)) && !empty($new_path)) {
21 $path = '/' . $new_path;