function EntityAdapter::onChange
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php \Drupal\Core\Entity\Plugin\DataType\EntityAdapter::onChange()
- 10 core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php \Drupal\Core\Entity\Plugin\DataType\EntityAdapter::onChange()
- 11.x core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php \Drupal\Core\Entity\Plugin\DataType\EntityAdapter::onChange()
Overrides TraversableTypedDataInterface::onChange
1 method overrides EntityAdapter::onChange()
- ConfigEntityAdapter::onChange in core/
lib/ Drupal/ Core/ Entity/ Plugin/ DataType/ ConfigEntityAdapter.php - React to changes to a child property or item.
File
-
core/
lib/ Drupal/ Core/ Entity/ Plugin/ DataType/ EntityAdapter.php, line 135
Class
- EntityAdapter
- Defines the "entity" data type.
Namespace
Drupal\Core\Entity\Plugin\DataTypeCode
public function onChange($property_name) {
if (isset($this->entity) && $this->entity instanceof FieldableEntityInterface) {
// Let the entity know of any changes.
$this->entity
->onChange($property_name);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.