Neos.Neos/Classes/Service/Controller/NodeController.php
protected function createContext($workspaceName)
    {
        $contextProperties = [
            'workspaceName' => $workspaceName
        ];

        $currentDomain = $this->domainRepository->findOneByActiveRequest();
        if ($currentDomain !== null) {
            $contextProperties['currentSite'] = $currentDomain->getSite();
            $contextProperties['currentDomain'] = $currentDomain;
        }

        return $this->contextFactory->create($contextProperties);
    }
protected function createContext($workspaceName)
    {
        $contextProperties = [
            'workspaceName' => $workspaceName
        ];

        $currentDomain = $this->domainRepository->findOneByActiveRequest();
        if ($currentDomain !== null) {
            $contextProperties['currentSite'] = $currentDomain->getSite();
            $contextProperties['currentDomain'] = $currentDomain;
        }

        return $this->contextFactory->create($contextProperties);
    }
protected function createContext ( $ workspaceName ) { $ contextProperties = [ 'workspaceName' => $ workspaceName ] ; $ currentDomain = $ this -> domainRepository -> findOneByActiveRequest ( ) ; if ( $ currentDomain !== null ) { $ contextProperties [ 'currentSite' ] = $ currentDomain -> getSite ( ) ; $ contextProperties [ 'currentDomain' ] = $ currentDomain ; } return $ this -> contextFactory -> create ( $ contextProperties ) ; }
Create a Context for a workspace given by name to be used in this controller.

@param string $workspaceName Name of the current workspace
@return \Neos\ContentRepository\Domain\Service\Context
Create a Context for a workspace given by name to be used in this controller .