You are here

interface TypedConfigManagerInterface in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php \Drupal\Core\Config\TypedConfigManagerInterface
  2. 10 core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php \Drupal\Core\Config\TypedConfigManagerInterface

Defines an interface for managing config schema type plugins.

Hierarchy

Expanded class hierarchy of TypedConfigManagerInterface

All classes that implement TypedConfigManagerInterface

See also

\Drupal\Core\Config\TypedConfigManager

\Drupal\Core\Config\Schema\ConfigSchemaDiscovery

hook_config_schema_info_alter()

https://www.drupal.org/node/1905070

17 files declare their use of TypedConfigManagerInterface
ConfigEntityAdapter.php in core/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php
ConfigEntityMapper.php in core/modules/config_translation/src/ConfigEntityMapper.php
ConfigEntityStorageTest.php in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
ConfigEntityTypeTest.php in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
ConfigMapperManager.php in core/modules/config_translation/src/ConfigMapperManager.php

... See full list

File

core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php, line 15

Namespace

Drupal\Core\Config
View source
interface TypedConfigManagerInterface extends TypedDataManagerInterface {

  /**
   * Gets typed configuration data.
   *
   * @param string $name
   *   Configuration object name.
   *
   * @return \Drupal\Core\TypedData\TraversableTypedDataInterface
   *   Typed configuration element.
   */
  public function get($name);

  /**
   * Creates a new data definition object from a type definition array and
   * actual configuration data. Since type definitions may contain variables
   * to be replaced, we need the configuration value to create it.
   *
   * @param array $definition
   *   The base type definition array, for which a data definition should be
   *   created.
   * @param $value
   *   Optional value of the configuration element.
   * @param string $name
   *   Optional name of the configuration element.
   * @param object $parent
   *   Optional parent element.
   *
   * @return \Drupal\Core\TypedData\DataDefinitionInterface
   *   A data definition for the given data type.
   */
  public function buildDataDefinition(array $definition, $value, $name = NULL, $parent = NULL);

  /**
   * 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);

  /**
   * Gets a specific plugin definition.
   *
   * @param string $plugin_id
   *   A plugin id.
   * @param bool $exception_on_invalid
   *   Ignored with TypedConfigManagerInterface. Kept for compatibility with
   *   DiscoveryInterface.
   *
   * @return array
   *   A plugin definition array. If the given plugin id does not have typed
   *   configuration definition assigned, the definition of an undefined
   *   element type is returned.
   */
  public function getDefinition($plugin_id, $exception_on_invalid = TRUE);

  /**
   * Gets typed data for a given configuration name and its values.
   *
   * @param string $config_name
   *   The machine name of the configuration.
   * @param array $config_data
   *   The data associated with the configuration. Note: This configuration
   *   doesn't yet have to be stored.
   *
   * @return \Drupal\Core\TypedData\TraversableTypedDataInterface
   *   The typed configuration element.
   */
  public function createFromNameAndData($config_name, array $config_data);

}

Members

Namesort descending Modifiers Type Description Overrides
CachedDiscoveryInterface::clearCachedDefinitions public function Clears static and persistent plugin definition caches. 1
CachedDiscoveryInterface::useCaches public function Disable the use of caches. 1
DiscoveryInterface::getDefinitions public function Gets the definition of all plugins for this type. 3
DiscoveryInterface::hasDefinition public function Indicates if a specific plugin definition exists. 1
TypedConfigManagerInterface::buildDataDefinition public function Creates a new data definition object from a type definition array and actual configuration data. Since type definitions may contain variables to be replaced, we need the configuration value to create it. 1
TypedConfigManagerInterface::createFromNameAndData public function Gets typed data for a given configuration name and its values. 1
TypedConfigManagerInterface::get public function Gets typed configuration data. 1
TypedConfigManagerInterface::getDefinition public function Gets a specific plugin definition. Overrides DiscoveryInterface::getDefinition
TypedConfigManagerInterface::hasConfigSchema public function Checks if the configuration schema with the given config name exists. 1
TypedDataManagerInterface::create public function Creates a new typed data object instance. 1
TypedDataManagerInterface::createDataDefinition public function Creates a new data definition object. 1
TypedDataManagerInterface::createInstance public function Instantiates a typed data object. Overrides FactoryInterface::createInstance
TypedDataManagerInterface::createListDataDefinition public function Creates a new list data definition for items of the given data type. 1
TypedDataManagerInterface::getCanonicalRepresentation public function Gets the canonical representation of a TypedData object. 1
TypedDataManagerInterface::getDefaultConstraints public function Gets default constraints for the given data definition. 1
TypedDataManagerInterface::getInstance public function Overrides MapperInterface::getInstance
TypedDataManagerInterface::getPropertyInstance public function Get a typed data instance for a property of a given typed data object. 1
TypedDataManagerInterface::getValidationConstraintManager public function Gets the validation constraint manager. 1
TypedDataManagerInterface::getValidator public function Gets the validator for validating typed data. 1
TypedDataManagerInterface::setValidationConstraintManager public function Sets the validation constraint manager. 1
TypedDataManagerInterface::setValidator public function Sets the validator for validating typed data. 1