diff core/lib/Drupal/Core/Config/ConfigRenameEvent.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/lib/Drupal/Core/Config/ConfigRenameEvent.php	Wed Nov 29 16:09:58 2017 +0000
@@ -0,0 +1,40 @@
+<?php
+
+namespace Drupal\Core\Config;
+
+/**
+ * Configuration event fired when renaming a configuration object.
+ */
+class ConfigRenameEvent extends ConfigCrudEvent {
+
+  /**
+   * The old configuration object name.
+   *
+   * @var string
+   */
+  protected $oldName;
+
+  /**
+   * Constructs the config rename event.
+   *
+   * @param \Drupal\Core\Config\Config $config
+   *   The configuration that has been renamed.
+   * @param string $old_name
+   *   The old configuration object name.
+   */
+  public function __construct(Config $config, $old_name) {
+    $this->config = $config;
+    $this->oldName = $old_name;
+  }
+
+  /**
+   * Gets the old configuration object name.
+   *
+   * @return string
+   *   The old configuration object name.
+   */
+  public function getOldName() {
+    return $this->oldName;
+  }
+
+}