BasicUsageObserver.php in Changed Fields API 8
Same filename and directory in other branches
Contains BasicUsageObserver.php.
Namespace
Drupal\changed_fields_basic_usageFile
examples/changed_fields_basic_usage/src/BasicUsageObserver.phpView source
<?php
/**
* @file
* Contains BasicUsageObserver.php.
*/
namespace Drupal\changed_fields_basic_usage;
use Drupal\changed_fields\Observer;
use Drupal\changed_fields\SubjectInterface;
/**
* Class BasicUsageObserver.
*/
class BasicUsageObserver extends Observer {
/**
* {@inheritdoc}
*/
public function update(SubjectInterface $nodeSubject) {
$node = $nodeSubject
->getNode();
$changedFields = $nodeSubject
->getChangedFields();
// Do something with $node depends on $changedFields.
}
}
Classes
Name | Description |
---|---|
BasicUsageObserver | Class BasicUsageObserver. |