Neos.Neos/Classes/Domain/Service/UserInterfaceModeService.php
public function findModeByName($modeName)
    {
        if (isset($this->editPreviewModes[$modeName])) {
            if ($this->editPreviewModes[$modeName] instanceof UserInterfaceMode) {
                $mode = $this->editPreviewModes[$modeName];
            } elseif (is_array($this->editPreviewModes[$modeName])) {
                $mode = UserInterfaceMode::createByConfiguration($modeName, $this->editPreviewModes[$modeName]);
                $this->editPreviewModes[$modeName] = $mode;
            } else {
                throw new Exception('The requested interface render mode "' . $modeName . '" is not configured correctly. Please make sure it is fully configured.', 1427716331);
            }
        } else {
            throw new Exception('The requested interface render mode "' . $modeName . '" is not configured. Please make sure it exists as key in the Settings path "Neos.Neos.Interface.editPreviewModes".', 1427715962);
        }

        return $mode;
    }
public function findModeByName($modeName)
    {
        if (isset($this->editPreviewModes[$modeName])) {
            if ($this->editPreviewModes[$modeName] instanceof UserInterfaceMode) {
                $mode = $this->editPreviewModes[$modeName];
            } elseif (is_array($this->editPreviewModes[$modeName])) {
                $mode = UserInterfaceMode::createByConfiguration($modeName, $this->editPreviewModes[$modeName]);
                $this->editPreviewModes[$modeName] = $mode;
            } else {
                throw new Exception('The requested interface render mode "' . $modeName . '" is not configured correctly. Please make sure it is fully configured.', 1427716331);
            }
        } else {
            throw new Exception('The requested interface render mode "' . $modeName . '" is not configured. Please make sure it exists as key in the Settings path "Neos.Neos.Interface.editPreviewModes".', 1427715962);
        }

        return $mode;
    }
public function findModeByName ( $ modeName ) { if ( isset ( $ this -> editPreviewModes [ $ modeName ] ) ) { if ( $ this -> editPreviewModes [ $ modeName ] instanceof UserInterfaceMode ) { $ mode = $ this -> editPreviewModes [ $ modeName ] ; } elseif ( is_array ( $ this -> editPreviewModes [ $ modeName ] ) ) { $ mode = UserInterfaceMode :: createByConfiguration ( $ modeName , $ this -> editPreviewModes [ $ modeName ] ) ; $ this -> editPreviewModes [ $ modeName ] = $ mode ; } else { throw new Exception ( 'The requested interface render mode "' . $ modeName . '" is not configured correctly. Please make sure it is fully configured.' , 1427716331 ) ; } } else { throw new Exception ( 'The requested interface render mode "' . $ modeName . '" is not configured. Please make sure it exists as key in the Settings path "Neos.Neos.Interface.editPreviewModes".' , 1427715962 ) ; } return $ mode ; }
Finds an rendering mode by name.

@param string $modeName
@return UserInterfaceMode
@throws Exception
Finds an rendering mode by name .