private function YamlFileLoader::normalizeRouteConfig

Normalize route configuration.

Parameters

array $config A resource config:

Return value

array

Throws

InvalidArgumentException if one of the provided config keys is not supported

1 call to YamlFileLoader::normalizeRouteConfig()
YamlFileLoader::load in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/YamlFileLoader.php
Loads a Yaml file.

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/YamlFileLoader.php, line 128

Class

YamlFileLoader
YamlFileLoader loads Yaml routing files.

Namespace

Symfony\Component\Routing\Loader

Code

private function normalizeRouteConfig(array $config) {
  foreach ($config as $key => $value) {
    if (!in_array($key, self::$availableKeys)) {
      throw new \InvalidArgumentException(sprintf('Yaml routing loader does not support given key: "%s". Expected one of the (%s).', $key, implode(', ', self::$availableKeys)));
    }
  }
  return $config;
}