config = $config; } /** * {@inheritdoc} */ public function processInbound($path, Request $request) { if ($path === '/') { $path = $this->config->get('system.site')->get('page.front'); if (empty($path)) { // We have to return a valid path but / won't be routable and config // might be broken so stop execution. throw new NotFoundHttpException(); } } return $path; } /** * {@inheritdoc} */ public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) { // The special path '' links to the default front page. if ($path === '/') { $path = '/'; } return $path; } }