1 config.inc public Config::validateData()

Validate the full contents of the configuration data.

This method is not automatically called when Config::setData() is called. Because validation is a potentially expensive operation, you should call this only when expecting potential problems in the provided data, such as when validating user-provided imports.

Throws

ConfigValidateException

File

core/includes/config.inc, line 613
This is the API for configuration storage.

Class

Config
Defines the default configuration object.

Code

public function validateData() {
  if (!$this->validated) {
    // Get config info if available. This may not be present if the providing
    // module is being enabled at the same time.
    $config_info = config_get_info($this->getName());
    if (!$config_info) {
      $config_info = NULL;
    }
    module_invoke_all('config_data_validate', $this, $config_info);
    $this->validated = TRUE;
  }
}