class ConfigCrudEvent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Config/ConfigCrudEvent.php \Drupal\Core\Config\ConfigCrudEvent
Wraps a configuration event for event listeners.
Hierarchy
- class \Symfony\Component\EventDispatcher\Event
- class \Drupal\Core\Config\ConfigCrudEvent
Expanded class hierarchy of ConfigCrudEvent
9 files declare their use of ConfigCrudEvent
- ConfigCacheTag.php in core/
modules/ system/ src/ EventSubscriber/ ConfigCacheTag.php - Contains \Drupal\system\EventSubscriber\ConfigCacheTag.
- ConfigSchemaChecker.php in core/
lib/ Drupal/ Core/ Config/ Testing/ ConfigSchemaChecker.php - Contains \Drupal\Core\Config\Testing\ConfigSchemaChecker.
- ConfigSubscriber.php in core/
modules/ language/ src/ EventSubscriber/ ConfigSubscriber.php - Contains \Drupal\language\EventSubscriber\ConfigSubscriber.
- EventSubscriber.php in core/
modules/ config/ tests/ config_import_test/ src/ EventSubscriber.php - Contains \Drupal\config_import_test\EventSubscriber.
- EventSubscriber.php in core/
modules/ config/ tests/ config_events_test/ src/ EventSubscriber.php - Contains \Drupal\config_events_test\EventSubscriber.
File
- core/
lib/ Drupal/ Core/ Config/ ConfigCrudEvent.php, line 15 - Contains \Drupal\Core\Config\ConfigCrudEvent.
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
* 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 |
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
public | function | Returns the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Gets the event's name. | |
Event:: |
public | function | Returns whether further event listeners should be triggered. | |
Event:: |
public | function | Stores the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Sets the event's name property. | |
Event:: |
public | function | Stops the propagation of the event to further event listeners. |