public function getSecurityContext() { $request = $this->container->get('request_stack')->getCurrentRequest(); $webspaceKey = $request->get('webspaceKey'); if (null !== $webspaceKey) { return $this->getSecurityContextByWebspace($webspaceKey); } return; }