You are here

class ConfigRenameEvent in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/ConfigRenameEvent.php \Drupal\Core\Config\ConfigRenameEvent
  2. 9 core/lib/Drupal/Core/Config/ConfigRenameEvent.php \Drupal\Core\Config\ConfigRenameEvent

Configuration event fired when renaming a configuration object.

Hierarchy

  • class \Drupal\Core\Config\ConfigRenameEvent extends \Drupal\Core\Config\ConfigCrudEvent

Expanded class hierarchy of ConfigRenameEvent

2 files declare their use of ConfigRenameEvent
ConfigFactoryOverrideBaseTest.php in core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php
LanguageConfigFactoryOverride.php in core/modules/language/src/Config/LanguageConfigFactoryOverride.php

File

core/lib/Drupal/Core/Config/ConfigRenameEvent.php, line 8

Namespace

Drupal\Core\Config
View source
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;
  }

}

Members