class ConfigCrudEvent in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Config/ConfigCrudEvent.php \Drupal\Core\Config\ConfigCrudEvent
Wraps a configuration event for event listeners.
Hierarchy
- class \Drupal\Component\EventDispatcher\Event extends \Symfony\Component\EventDispatcher\Event
- class \Drupal\Core\Config\ConfigCrudEvent
Expanded class hierarchy of ConfigCrudEvent
15 files declare their use of ConfigCrudEvent
- AdvisoriesConfigSubscriber.php in core/
modules/ system/ src/ EventSubscriber/ AdvisoriesConfigSubscriber.php - ColorConfigCacheInvalidator.php in core/
modules/ color/ src/ EventSubscriber/ ColorConfigCacheInvalidator.php - ConfigCacheTag.php in core/
modules/ system/ src/ EventSubscriber/ ConfigCacheTag.php - ConfigFactoryOverrideBaseTest.php in core/
tests/ Drupal/ Tests/ Core/ Config/ ConfigFactoryOverrideBaseTest.php - ConfigSchemaChecker.php in core/
lib/ Drupal/ Core/ Config/ Development/ ConfigSchemaChecker.php
File
- core/
lib/ Drupal/ Core/ Config/ ConfigCrudEvent.php, line 10
Namespace
Drupal\Core\ConfigView source
class ConfigCrudEvent extends Event {
/**
* Configuration object.
*
* @var \Drupal\Core\Config\Config
*/
protected $config;
/**
* Constructs a configuration event object.
*
* @param \Drupal\Core\Config\Config $config
* Configuration object.
*/
public function __construct(Config $config) {
$this->config = $config;
}
/**
* Gets configuration object.
*
* @return \Drupal\Core\Config\Config
* The configuration object that caused the event to fire.
*/
public function getConfig() {
return $this->config;
}
/**
* Checks to see if the provided configuration key's value has changed.
*
* @param string $key
* The configuration key to check if it has changed.
*
* @return bool
*/
public function isChanged($key) {
return $this->config
->get($key) !== $this->config
->getOriginal($key);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigCrudEvent:: |
protected | property | Configuration object. | |
ConfigCrudEvent:: |
public | function | Gets configuration object. | |
ConfigCrudEvent:: |
public | function | Checks to see if the provided configuration key's value has changed. | |
ConfigCrudEvent:: |
public | function | Constructs a configuration event object. | 1 |