modules/acm_exception/src/RouteExceptionHandler.php
private function getConfig($key, RouteException $e) {
    $scenario = $e->getOperation();
    $default = $this->config->get("default.{$key}");
    $scenario = $this->config->get("routes.{$scenario}.{$key}");
    foreach ([$scenario, $default] as $candidate) {
      if (!empty(trim($candidate))) {
        return $candidate;
      }
    }
    return NULL;
  }
private function getConfig($key, RouteException $e) {
    $scenario = $e->getOperation();
    $default = $this->config->get("default.{$key}");
    $scenario = $this->config->get("routes.{$scenario}.{$key}");
    foreach ([$scenario, $default] as $candidate) {
      if (!empty(trim($candidate))) {
        return $candidate;
      }
    }
    return NULL;
  }
private function getConfig ( $ key , RouteException $ e ) { $ scenario = $ e -> getOperation ( ) ; $ default = $ this -> config -> get ( "default.{$key}" ) ; $ scenario = $ this -> config -> get ( "routes.{$scenario}.{$key}" ) ; foreach ( [ $ scenario , $ default ] as $ candidate ) { if ( ! empty ( trim ( $ candidate ) ) ) { return $ candidate ; } } return NULL ; }
Fetch config for a given RouteException.

Looks for scenario specific config and then falls back on defaults.

@param string $key
The exception config key to fetch.
@param \Drupal\acm\Connector\RouteException $e
The RouteException that was thrown.

@return mixed
The config on success.
Fetch config for a given RouteException .