Drupal 8  8.0.2
ExtensionInstallStorage Class Reference
Inheritance diagram for ExtensionInstallStorage:

Public Member Functions

 __construct (StorageInterface $config_storage, $directory=self::CONFIG_INSTALL_DIRECTORY, $collection=StorageInterface::DEFAULT_COLLECTION, $include_profile=TRUE)
 
 createCollection ($collection)
 
- Public Member Functions inherited from InstallStorage
 __construct ($directory=self::CONFIG_INSTALL_DIRECTORY, $collection=StorageInterface::DEFAULT_COLLECTION)
 
 getFilePath ($name)
 
 exists ($name)
 
 write ($name, array $data)
 
 delete ($name)
 
 rename ($name, $new_name)
 
 listAll ($prefix= '')
 
 getComponentNames (array $list)
 
 getCoreNames ()
 
 deleteAll ($prefix= '')
 
 reset ()
 
- Public Member Functions inherited from FileStorage
 __construct ($directory, $collection=StorageInterface::DEFAULT_COLLECTION)
 
 getFilePath ($name)
 
 exists ($name)
 
 read ($name)
 
 readMultiple (array $names)
 
 write ($name, array $data)
 
 delete ($name)
 
 rename ($name, $new_name)
 
 encode ($data)
 
 decode ($raw)
 
 listAll ($prefix= '')
 
 deleteAll ($prefix= '')
 
 createCollection ($collection)
 
 getCollectionName ()
 
 getAllCollectionNames ()
 

Protected Member Functions

 getAllFolders ()
 
- Protected Member Functions inherited from InstallStorage
 getAllFolders ()
 
 getComponentFolder (Extension $extension)
 
 getCoreFolder ()
 
- Protected Member Functions inherited from FileStorage
 ensureStorage ()
 
 getAllCollectionNamesHelper ($directory)
 
 getCollectionDirectory ()
 

Protected Attributes

 $configStorage
 
 $includeProfile = TRUE
 
- Protected Attributes inherited from InstallStorage
 $folders
 
 $directory
 
- Protected Attributes inherited from FileStorage
 $collection
 
 $directory = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from FileStorage
static getFileExtension ()
 
- Data Fields inherited from InstallStorage
const CONFIG_INSTALL_DIRECTORY = 'config/install'
 
const CONFIG_OPTIONAL_DIRECTORY = 'config/optional'
 
const CONFIG_SCHEMA_DIRECTORY = 'config/schema'
 
- Data Fields inherited from StorageInterface
const DEFAULT_COLLECTION = ''
 

Detailed Description

Storage to access configuration and schema in enabled extensions.

See Also

Constructor & Destructor Documentation

__construct ( StorageInterface  $config_storage,
  $directory = self::CONFIG_INSTALL_DIRECTORY,
  $collection = StorageInterface::DEFAULT_COLLECTION,
  $include_profile = TRUE 
)

Overrides ::__construct().

Parameters
\Drupal\Core\Config\StorageInterface$config_storageThe active configuration store where the list of enabled modules and themes is stored.
string$directoryThe directory to scan in each extension to scan for files. Defaults to 'config/install'.
string$collection(optional) The collection to store configuration in. Defaults to the default collection.
bool$include_profile(optional) Whether to include the install profile in extensions to search and to get overrides from.

Member Function Documentation

createCollection (   $collection)

{Creates a collection on the storage.A configuration storage can contain multiple sets of configuration objects in partitioned collections. The collection name identifies the current collection used.Implementations of this method must provide a new instance to avoid side effects caused by the fact that Config objects have their storage injected.

Parameters
string$collectionThe collection name. Valid collection names conform to the following regex [a-zA-Z_.]. A storage does not need to have a collection set. However, if a collection is set, then storage should use it to store configuration in a way that allows retrieval of configuration for a particular collection.
Returns
A new instance of the storage backend with the collection set.
}

Implements StorageInterface.

getAllFolders ( )
protected

Returns a map of all config object names and their folders.

The list is based on enabled modules and themes. The active configuration storage is used rather than and in order to resolve circular dependencies between these services and and .

Returns
array An array mapping config object names with directories.

References Settings\get(), InstallStorage\getComponentNames(), InstallStorage\getCoreNames(), and Drupal\root().

Here is the call graph for this function:


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