You are here

public function BasicUsageObserver::update in Changed Fields API 8.2

Same name and namespace in other branches
  1. 8.3 examples/changed_fields_basic_usage/src/BasicUsageObserver.php \Drupal\changed_fields_basic_usage\BasicUsageObserver::update()
  2. 8 examples/changed_fields_basic_usage/src/BasicUsageObserver.php \Drupal\changed_fields_basic_usage\BasicUsageObserver::update()

File

examples/changed_fields_basic_usage/src/BasicUsageObserver.php, line 33
Contains BasicUsageObserver.php.

Class

BasicUsageObserver
Class BasicUsageObserver.

Namespace

Drupal\changed_fields_basic_usage

Code

public function update(SplSubject $nodeSubject) {
  $node = $nodeSubject
    ->getNode();
  $changedFields = $nodeSubject
    ->getChangedFields();

  // Do something with $node depends on $changedFields.
}