You are here

public function BasicUsageObserver::update in Changed Fields API 7.3

Same name and namespace in other branches
  1. 7 examples/changed_fields_basic_usage/includes/changed_fields_basic_usage.observer.inc \BasicUsageObserver::update()
  2. 7.2 examples/changed_fields_basic_usage/includes/changed_fields_basic_usage.observer.inc \BasicUsageObserver::update()

File

examples/changed_fields_basic_usage/includes/changed_fields_basic_usage.observer.inc, line 31
Observer example.

Class

BasicUsageObserver
Class BasicUsageObserver.

Code

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

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