You are here

changed_fields_basic_usage.observer.inc in Changed Fields API 7

File

examples/changed_fields_basic_usage/includes/changed_fields_basic_usage.observer.inc
View source
<?php

/**
 * @file
 * changed_fields_basic_usage.observer.inc file.
 */

/**
 * Class BasicUsageObserver.
 */
class BasicUsageObserver extends CFObserver {

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

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

}

Classes

Namesort descending Description
BasicUsageObserver Class BasicUsageObserver.