Provides a base class for configuration objects with storage support.
Encapsulates all capabilities needed for configuration handling for a specific configuration object, including storage and data type casting.
The default implementation in \Drupal\Core\Config\Config adds support for runtime overrides. Extend from StorableConfigBase directly to manage configuration with a storage backend that does not support overrides.
Name | Modifiers | Type | Description |
---|---|---|---|
ConfigBase::$data | protected | property | The data of the configuration object. |
ConfigBase::$name | protected | property | The name of the configuration object. |
ConfigBase::castSafeStrings | protected | function | Casts any objects that implement MarkupInterface to string. |
ConfigBase::clear | public | function | Unsets a value in this configuration object. |
ConfigBase::get | public | function | Gets data from this configuration object. |
ConfigBase::getCacheContexts | public | function | The cache contexts associated with this object. Overrides RefinableCacheableDependencyTrait::getCacheContexts |
ConfigBase::getCacheMaxAge | public | function | The maximum age for which this object may be cached. Overrides RefinableCacheableDependencyTrait::getCacheMaxAge |
ConfigBase::getCacheTags | public | function | The cache tags associated with this object. Overrides RefinableCacheableDependencyTrait::getCacheTags |
ConfigBase::getName | public | function | Returns the name of this configuration object. |
ConfigBase::MAX_NAME_LENGTH | constant | The maximum length of a configuration object name. | |
ConfigBase::merge | public | function | Merges data into a configuration object. |
ConfigBase::set | public | function | Sets a value in this configuration object. |
ConfigBase::setData | public | function | Replaces the data of this configuration object. |
ConfigBase::setName | public | function | Sets the name of this configuration object. |
ConfigBase::validateKeys | protected | function | Validates all keys in a passed in config array structure. |
ConfigBase::validateName | public static | function | Validates the configuration object name. |
DependencySerializationTrait::$_serviceIds | protected | property | An array of service IDs keyed by property name used for serialization. |
DependencySerializationTrait::__sleep | public | function | |
DependencySerializationTrait::__wakeup | public | function | |
RefinableCacheableDependencyTrait::$cacheContexts | protected | property | Cache contexts. |
RefinableCacheableDependencyTrait::$cacheMaxAge | protected | property | Cache max-age. |
RefinableCacheableDependencyTrait::$cacheTags | protected | property | Cache tags. |
RefinableCacheableDependencyTrait::addCacheableDependency | public | function | Adds a dependency on an object: merges its cacheability metadata. Overrides RefinableCacheableDependencyInterface::addCacheableDependency |
RefinableCacheableDependencyTrait::addCacheContexts | public | function | Adds cache contexts. Overrides RefinableCacheableDependencyInterface::addCacheContexts |
RefinableCacheableDependencyTrait::addCacheTags | public | function | Adds cache tags. Overrides RefinableCacheableDependencyInterface::addCacheTags |
RefinableCacheableDependencyTrait::mergeCacheMaxAge | public | function | Merges the maximum age (in seconds) with the existing maximum age. Overrides RefinableCacheableDependencyInterface::mergeCacheMaxAge |
StorableConfigBase::$isNew | protected | property | Whether the configuration object is new or has been saved to the storage. |
StorableConfigBase::$originalData | protected | property | The data of the configuration object. |
StorableConfigBase::$schemaWrapper | protected | property | The config schema wrapper object for this configuration object. |
StorableConfigBase::$storage | protected | property | The storage used to load and save this configuration object. |
StorableConfigBase::$typedConfigManager | protected | property | The typed config manager. |
StorableConfigBase::castValue | protected | function | Casts the value to correct data type using the configuration schema. |
StorableConfigBase::delete | abstract public | function | Deletes the configuration object. |
StorableConfigBase::getSchemaWrapper | protected | function | Gets the schema wrapper for the whole configuration object. |
StorableConfigBase::getStorage | public | function | Retrieves the storage used to load and save this configuration object. |
StorableConfigBase::initWithData | public | function | Initializes a configuration object with pre-loaded data. |
StorableConfigBase::isNew | public | function | Returns whether this configuration object is new. |
StorableConfigBase::save | abstract public | function | Saves the configuration object. |
StorableConfigBase::validateValue | protected | function | Validate the values are allowed data types. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!StorableConfigBase.php/class/StorableConfigBase/8.1.x