createByConfiguration() public static méthode

Creates an UserInterfaceMode object by configuration
public static createByConfiguration ( string $modeName, array $configuration ) : static
$modeName string
$configuration array
Résultat static
 /**
  * Finds an rendering mode by name.
  *
  * @param string $modeName
  * @return UserInterfaceMode
  * @throws Exception
  */
 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;
 }