You are here

public function EntitySubject::attach in Changed Fields API 8.3

File

src/EntitySubject.php, line 57

Class

EntitySubject
Implements content entity subject.

Namespace

Drupal\changed_fields

Code

public function attach(\SplObserver $observer) {
  if (!$observer instanceof ObserverInterface) {
    throw new \InvalidArgumentException('Observer must implement ObserverInterface interface.');
  }
  $this->observers[spl_object_hash($observer)] = $observer;
}