You are here

public function EventSubscriber::configEventRecorder in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/config/tests/config_events_test/src/EventSubscriber.php \Drupal\config_events_test\EventSubscriber::configEventRecorder()

Reacts to config event.

Parameters

\Drupal\Core\Config\ConfigCrudEvent $event: The configuration event.

string $name: The event name.

File

core/modules/config/tests/config_events_test/src/EventSubscriber.php, line 43
Contains \Drupal\config_events_test\EventSubscriber.

Class

EventSubscriber

Namespace

Drupal\config_events_test

Code

public function configEventRecorder(ConfigCrudEvent $event, $name) {
  $config = $event
    ->getConfig();
  $this->state
    ->set('config_events_test.event', array(
    'event_name' => $name,
    'current_config_data' => $config
      ->get(),
    'original_config_data' => $config
      ->getOriginal(),
    'raw_config_data' => $config
      ->getRawData(),
  ));
}