public function getBaseUrl($path = '') { $context = $this->symfonyRouter->getContext(); $baseUrl = $context->getScheme() . '://' . $context->getHost() . $path; return $baseUrl; }