You are here

class BasicUsageObserver in Changed Fields API 7

Same name and namespace in other branches
  1. 7.3 examples/changed_fields_basic_usage/includes/changed_fields_basic_usage.observer.inc \BasicUsageObserver
  2. 7.2 examples/changed_fields_basic_usage/includes/changed_fields_basic_usage.observer.inc \BasicUsageObserver

Class BasicUsageObserver.

Hierarchy

Expanded class hierarchy of BasicUsageObserver

File

examples/changed_fields_basic_usage/includes/changed_fields_basic_usage.observer.inc, line 11
changed_fields_basic_usage.observer.inc file.

View source
class BasicUsageObserver extends CFObserver {

  /**
   * {@inheritdoc}
   */
  public function update(CFNodeSubject $nodeSubject) {
    $node = $nodeSubject
      ->getNode();
    $changedFields = $nodeSubject
      ->getChangedFields();

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

}

Members

Namesort descending Modifiers Type Description Overrides
BasicUsageObserver::update public function Update method with info about event. Overrides CFObserver::update
CFObserver::$id private property
CFObserver::getId public function Method to get observer id.
CFObserver::__construct public function