public function BasicUsageObserver::update in Changed Fields API 7.2
Same name and namespace in other branches
- 7.3 examples/changed_fields_basic_usage/includes/changed_fields_basic_usage.observer.inc \BasicUsageObserver::update()
- 7 examples/changed_fields_basic_usage/includes/changed_fields_basic_usage.observer.inc \BasicUsageObserver::update()
Update method with info about event.
It is called by CFNodeSubject when node fields have been changed.
Parameters
CFSubjectInterface $nodeSubject: Node subject object.
Overrides CFObserver::update
File
- examples/
changed_fields_basic_usage/ includes/ changed_fields_basic_usage.observer.inc, line 16 - Observer example.
Class
- BasicUsageObserver
- Class BasicUsageObserver.
Code
public function update(CFSubjectInterface $nodeSubject) {
$node = $nodeSubject
->getNode();
$changedFields = $nodeSubject
->getChangedFields();
// Do something with $node depends on $changedFields.
}