Drupal 8  8.0.2
TypedConfigManager Class Reference
Inheritance diagram for TypedConfigManager:

Public Member Functions

 __construct (StorageInterface $configStorage, StorageInterface $schemaStorage, CacheBackendInterface $cache, ModuleHandlerInterface $module_handler)
 
 get ($name)
 
 buildDataDefinition (array $definition, $value, $name=NULL, $parent=NULL)
 
 getDefinition ($base_plugin_id, $exception_on_invalid=TRUE)
 
 clearCachedDefinitions ()
 
 hasConfigSchema ($name)
 
- Public Member Functions inherited from TypedDataManager
 __construct (\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ClassResolverInterface $class_resolver)
 
 createInstance ($data_type, array $configuration=array())
 
 create (DataDefinitionInterface $definition, $value=NULL, $name=NULL, $parent=NULL)
 
 createDataDefinition ($data_type)
 
 createListDataDefinition ($item_type)
 
 getInstance (array $options)
 
 getPropertyInstance (TypedDataInterface $object, $property_name, $value=NULL)
 
 setValidator (ValidatorInterface $validator)
 
 getValidator ()
 
 setValidationConstraintManager (ConstraintManager $constraintManager)
 
 getValidationConstraintManager ()
 
 getDefaultConstraints (DataDefinitionInterface $definition)
 
 clearCachedDefinitions ()
 
 getCanonicalRepresentation (TypedDataInterface $data)
 
- Public Member Functions inherited from DefaultPluginManager
 __construct ($subdir,\Traversable $namespaces, ModuleHandlerInterface $module_handler, $plugin_interface=NULL, $plugin_definition_annotation_name= 'Drupal\Component\Annotation\Plugin')
 
 setCacheBackend (CacheBackendInterface $cache_backend, $cache_key, array $cache_tags=array())
 
 getDefinitions ()
 
 clearCachedDefinitions ()
 
 useCaches ($use_caches=FALSE)
 
 processDefinition (&$definition, $plugin_id)
 
- Public Member Functions inherited from PluginManagerBase
 getDefinition ($plugin_id, $exception_on_invalid=TRUE)
 
 getDefinitions ()
 
 createInstance ($plugin_id, array $configuration=array())
 
 getInstance (array $options)
 
- Public Member Functions inherited from DiscoveryInterface
 hasDefinition ($plugin_id)
 

Protected Member Functions

 getDiscovery ()
 
 getFallbackName ($name)
 
 replaceName ($name, $data)
 
 alterDefinitions (&$definitions)
 
- Protected Member Functions inherited from DefaultPluginManager
 alterInfo ($alter_hook)
 
 getCachedDefinitions ()
 
 setCachedDefinitions ($definitions)
 
 getDiscovery ()
 
 getFactory ()
 
 findDefinitions ()
 
 alterDefinitions (&$definitions)
 
 providerExists ($provider)
 
- Protected Member Functions inherited from PluginManagerBase
 getDiscovery ()
 
 getFactory ()
 

Protected Attributes

 $configStorage
 
 $schemaStorage
 
 $definitions
 
- Protected Attributes inherited from TypedDataManager
 $validator
 
 $constraintManager
 
 $prototypes = array()
 
 $classResolver
 
- Protected Attributes inherited from DefaultPluginManager
 $cacheKey
 
 $cacheTags = array()
 
 $alterHook
 
 $subdir
 
 $moduleHandler
 
 $defaults = array()
 
 $pluginDefinitionAnnotationName
 
 $pluginInterface
 
 $namespaces
 
- Protected Attributes inherited from PluginManagerBase
 $discovery
 
 $factory
 
 $mapper
 

Detailed Description

Manages config schema type plugins.

Constructor & Destructor Documentation

__construct ( StorageInterface  $configStorage,
StorageInterface  $schemaStorage,
CacheBackendInterface  $cache,
ModuleHandlerInterface  $module_handler 
)

Creates a new typed configuration manager.

Parameters
\Drupal\Core\Config\StorageInterface$configStorageThe storage object to use for reading schema data
\Drupal\Core\Config\StorageInterface$schemaStorageThe storage object to use for reading schema data
\Drupal\Core\Cache\CacheBackendInterface$cacheThe cache backend to use for caching the definitions.

References DefaultPluginManager\alterInfo(), Drupal\moduleHandler(), and DefaultPluginManager\setCacheBackend().

Here is the call graph for this function:

Member Function Documentation

alterDefinitions ( $definitions)
protected

{}

buildDataDefinition ( array  $definition,
  $value,
  $name = NULL,
  $parent = NULL 
)

{}

References TypedDataManager\createDataDefinition(), TypedConfigManager\getDefinition(), and TypedConfigManager\replaceName().

Referenced by TypedConfigManager\get().

Here is the call graph for this function:

Here is the caller graph for this function:

clearCachedDefinitions ( )

{Clears static and persistent plugin definition caches.Don't resort to calling ::cache()->delete() and friends to make Drupal detect new or updated plugin definitions. Always use this method on the appropriate plugin type's plugin manager!}

Implements CachedDiscoveryInterface.

get (   $name)

{}

References TypedConfigManager\buildDataDefinition(), TypedDataManager\create(), and TypedConfigManager\getDefinition().

Here is the call graph for this function:

getDefinition (   $base_plugin_id,
  $exception_on_invalid = TRUE 
)

{Gets a specific plugin definition.

Parameters
string$plugin_idA plugin id.
bool$exception_on_invalid(optional) If TRUE, an invalid plugin ID will throw an exception.
Returns
mixed A plugin definition, or NULL if the plugin ID is invalid and $exception_on_invalid is FALSE.
Exceptions
\Drupal\Component\Plugin\Exception\PluginNotFoundExceptionThrown if $plugin_id is invalid and $exception_on_invalid is TRUE.
}

Implements DiscoveryInterface.

References DefaultPluginManager\getDefinitions(), TypedConfigManager\getFallbackName(), and NestedArray\mergeDeepArray().

Referenced by TypedConfigManager\buildDataDefinition(), TypedConfigManager\get(), and TypedConfigManager\hasConfigSchema().

Here is the call graph for this function:

Here is the caller graph for this function:

getDiscovery ( )
protected

{}

getFallbackName (   $name)
protected

Gets fallback configuration schema name.

Parameters
string$nameConfiguration name or key.
Returns
null|string The resolved schema name for the given configuration name or key. Returns null if there is no schema name to fallback to. For example, breakpoint.breakpoint.module.toolbar.narrow will check for definitions in the following order: breakpoint.breakpoint.module.toolbar.* breakpoint.breakpoint.module.*.* breakpoint.breakpoint.module.* breakpoint.breakpoint.*.*.* breakpoint.breakpoint.* breakpoint.*.*.*.* breakpoint.* Colons are also used, for example, block.settings.system_menu_block:footer will check for definitions in the following order: block.settings.system_menu_block:* block.settings.*:* block.settings.* block.*.*:* block.*

Referenced by TypedConfigManager\getDefinition().

Here is the caller graph for this function:

hasConfigSchema (   $name)

{}

References TypedConfigManager\getDefinition().

Here is the call graph for this function:

replaceName (   $name,
  $data 
)
protected

Replaces variables in configuration name.

The configuration name may contain one or more variables to be replaced, enclosed in square brackets like '[name]' and will follow the replacement rules defined by the replaceVariable() method.

Parameters
string$nameConfiguration name with variables in square brackets.
mixed$dataConfiguration data for the element.
Returns
string Configuration name with variables replaced.

Referenced by TypedConfigManager\buildDataDefinition().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: