class StorageTransformEvent
Same name in other branches
- 9 core/lib/Drupal/Core/Config/StorageTransformEvent.php \Drupal\Core\Config\StorageTransformEvent
- 8.9.x core/lib/Drupal/Core/Config/StorageTransformEvent.php \Drupal\Core\Config\StorageTransformEvent
- 11.x core/lib/Drupal/Core/Config/StorageTransformEvent.php \Drupal\Core\Config\StorageTransformEvent
Class StorageTransformEvent.
This event allows subscribers to alter the configuration of the storage that is being transformed.
Hierarchy
- class \Drupal\Component\EventDispatcher\Event extends \Symfony\Contracts\EventDispatcher\Event
- class \Drupal\Core\Config\StorageTransformEvent extends \Drupal\Component\EventDispatcher\Event
Expanded class hierarchy of StorageTransformEvent
2 files declare their use of StorageTransformEvent
- EventSubscriber.php in core/
modules/ config/ tests/ config_transformer_test/ src/ EventSubscriber.php - ExcludedModulesEventSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ ExcludedModulesEventSubscriber.php
File
-
core/
lib/ Drupal/ Core/ Config/ StorageTransformEvent.php, line 13
Namespace
Drupal\Core\ConfigView source
class StorageTransformEvent extends Event {
/**
* The configuration storage which is transformed.
*
* This storage can be interacted with by event subscribers and will be
* used instead of the original storage after all event subscribers have been
* called.
*
* @var \Drupal\Core\Config\StorageInterface
*/
protected $storage;
/**
* StorageTransformEvent constructor.
*
* @param \Drupal\Core\Config\StorageInterface $storage
* The storage with the configuration to transform.
*/
public function __construct(StorageInterface $storage) {
$this->storage = $storage;
}
/**
* Returns the mutable storage ready to be read from and written to.
*
* @return \Drupal\Core\Config\StorageInterface
* The config storage.
*/
public function getStorage() {
return $this->storage;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
StorageTransformEvent::$storage | protected | property | The configuration storage which is transformed. |
StorageTransformEvent::getStorage | public | function | Returns the mutable storage ready to be read from and written to. |
StorageTransformEvent::__construct | public | function | StorageTransformEvent constructor. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.