You are here

abstract class Observer in Changed Fields API 8

Class Observer.

Hierarchy

Expanded class hierarchy of Observer

2 files declare their use of Observer
BasicUsageObserver.php in examples/changed_fields_basic_usage/src/BasicUsageObserver.php
Contains BasicUsageObserver.php.
ExtendedFieldComparatorObserver.php in examples/changed_fields_extended_field_comparator/src/ExtendedFieldComparatorObserver.php
Contains ExtendedFieldComparatorObserver.php.

File

src/Observer.php, line 13
Contains Observer.php.

Namespace

Drupal\changed_fields
View source
abstract class Observer implements ObserverInterface {

  /**
   * @var string
   */
  private $id;

  /**
   * @param $id
   */
  public function __construct($id) {
    $this->id = $id;
  }

  /**
   * {@inheritdoc}
   */
  public abstract function update(SubjectInterface $nodeSubject);

  /**
   * {@inheritdoc}
   */
  public function getId() {
    return $this->id;
  }

}

Members

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