3 namespace Drupal\Core\Config;
5 use Symfony\Component\EventDispatcher\Event;
8 * Wraps a configuration event for event listeners.
10 class ConfigCrudEvent extends Event {
13 * Configuration object.
15 * @var \Drupal\Core\Config\Config
20 * Constructs a configuration event object.
22 * @param \Drupal\Core\Config\Config $config
23 * Configuration object.
25 public function __construct(Config $config) {
26 $this->config = $config;
30 * Gets configuration object.
32 * @return \Drupal\Core\Config\Config
33 * The configuration object that caused the event to fire.
35 public function getConfig() {
40 * Checks to see if the provided configuration key's value has changed.
43 * The configuration key to check if it has changed.
47 public function isChanged($key) {
48 return $this->config->get($key) !== $this->config->getOriginal($key);