class ConfigRevertEvent in Configuration Update Manager 8
Event context class for configuration revert/import events.
This class is passed in as the event when the \Drupal\config_update\ConfigRevertInterface::IMPORT, \Drupal\config_update\ConfigDeleteInterface::DELETE, and \Drupal\config_update\ConfigRevertInterface::REVERT events are triggered.
Hierarchy
- class \Drupal\config_update\ConfigRevertEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of ConfigRevertEvent
File
- src/
ConfigRevertEvent.php, line 15
Namespace
Drupal\config_updateView source
class ConfigRevertEvent extends Event {
/**
* The type of configuration that is being imported or reverted.
*
* @var string
*/
protected $type;
/**
* The name of the config item being imported or reverted, without prefix.
*
* @var string
*/
protected $name;
/**
* Constructs a new ConfigRevertEvent.
*
* @param string $type
* The type of configuration being imported or reverted.
* @param string $name
* The name of the config item being imported/reverted, without prefix.
*/
public function __construct($type, $name) {
$this->type = $type;
$this->name = $name;
}
/**
* Returns the type of configuration being imported or reverted.
*
* @return string
* The type of configuration, either 'system.simple' or a config entity
* type machine name.
*/
public function getType() {
return $this->type;
}
/**
* Returns the name of the config item, without prefix.
*
* @return string
* The name of the config item being imported/reverted/deleted, with the
* prefix.
*/
public function getName() {
return $this->name;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigRevertEvent:: |
protected | property | The name of the config item being imported or reverted, without prefix. | |
ConfigRevertEvent:: |
protected | property | The type of configuration that is being imported or reverted. | |
ConfigRevertEvent:: |
public | function | Returns the name of the config item, without prefix. | |
ConfigRevertEvent:: |
public | function | Returns the type of configuration being imported or reverted. | |
ConfigRevertEvent:: |
public | function | Constructs a new ConfigRevertEvent. |