diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php index 64735ad..9228d7d 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -285,4 +285,20 @@ protected function replaceVariable($value, $data) { } } + /** + * Checks if the configuration schema with the given config name exists. + * + * @param string $name + * Configuration name. + * + * @return bool + * TRUE if configuration schema exists, FALSE otherwise. + */ + public function hasConfigSchema($name) { + // The schema system falls back on the Property class for unknown types. + // See http://drupal.org/node/1905230 + $definition = $this->getDefinition($name); + return is_array($definition) && $definition['class'] != '\Drupal\Core\Config\Schema\Property'; + } + }