function EntityAdapter::setValue
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php \Drupal\Core\Entity\Plugin\DataType\EntityAdapter::setValue()
- 10 core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php \Drupal\Core\Entity\Plugin\DataType\EntityAdapter::setValue()
- 11.x core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php \Drupal\Core\Entity\Plugin\DataType\EntityAdapter::setValue()
Overrides TypedData::setValue
File
-
core/
lib/ Drupal/ Core/ Entity/ Plugin/ DataType/ EntityAdapter.php, line 65
Class
- EntityAdapter
- Defines the "entity" data type.
Namespace
Drupal\Core\Entity\Plugin\DataTypeCode
public function setValue($entity, $notify = TRUE) {
$this->entity = $entity;
// Notify the parent of any changes.
if ($notify && isset($this->parent)) {
$this->parent
->onChange($this->name);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.