W3cubDocs

/Drupal 8

public function ConfigCrudEvent::isChanged

public ConfigCrudEvent::isChanged($key)

Checks to see if the provided configuration key's value has changed.

Parameters

string $key: The configuration key to check if it has changed.

Return value

bool

File

core/lib/Drupal/Core/Config/ConfigCrudEvent.php, line 47

Class

ConfigCrudEvent
Wraps a configuration event for event listeners.

Namespace

Drupal\Core\Config

Code

public function isChanged($key) {
  return $this->config->get($key) !== $this->config->getOriginal($key);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!ConfigCrudEvent.php/function/ConfigCrudEvent::isChanged/8.1.x