You are here

class ExtendedFieldComparatorObserver in Changed Fields API 8

Same name and namespace in other branches
  1. 8.3 examples/changed_fields_extended_field_comparator/src/ExtendedFieldComparatorObserver.php \Drupal\changed_fields_extended_field_comparator\ExtendedFieldComparatorObserver
  2. 8.2 examples/changed_fields_extended_field_comparator/src/ExtendedFieldComparatorObserver.php \Drupal\changed_fields_extended_field_comparator\ExtendedFieldComparatorObserver

Class ExtendedFieldComparatorObserver.

Hierarchy

Expanded class hierarchy of ExtendedFieldComparatorObserver

1 file declares its use of ExtendedFieldComparatorObserver
changed_fields_extended_field_comparator.module in examples/changed_fields_extended_field_comparator/changed_fields_extended_field_comparator.module
Contains changed_fields_extended_field_comparator.module.
1 string reference to 'ExtendedFieldComparatorObserver'
changed_fields_extended_field_comparator.services.yml in examples/changed_fields_extended_field_comparator/changed_fields_extended_field_comparator.services.yml
examples/changed_fields_extended_field_comparator/changed_fields_extended_field_comparator.services.yml
1 service uses ExtendedFieldComparatorObserver
changed_fields.observer in examples/changed_fields_extended_field_comparator/changed_fields_extended_field_comparator.services.yml
Drupal\changed_fields_extended_field_comparator\ExtendedFieldComparatorObserver

File

examples/changed_fields_extended_field_comparator/src/ExtendedFieldComparatorObserver.php, line 16
Contains ExtendedFieldComparatorObserver.php.

Namespace

Drupal\changed_fields_extended_field_comparator
View source
class ExtendedFieldComparatorObserver extends Observer {

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

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

}

Members

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