function TypedDataInterface::setValue
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/TypedDataInterface.php \Drupal\Core\TypedData\TypedDataInterface::setValue()
- 8.9.x core/lib/Drupal/Core/TypedData/TypedDataInterface.php \Drupal\Core\TypedData\TypedDataInterface::setValue()
- 10 core/lib/Drupal/Core/TypedData/TypedDataInterface.php \Drupal\Core\TypedData\TypedDataInterface::setValue()
Sets the data value.
Parameters
mixed|null $value: The value to set in the format as documented for the data type or NULL to unset the data value.
bool $notify: (optional) Whether to notify the parent object of the change. Defaults to TRUE. If a property is updated from a parent object, set it to FALSE to avoid being notified again.
Throws
\InvalidArgumentException If the value input is inappropriate.
\Drupal\Core\TypedData\Exception\ReadOnlyException If the data is read-only.
1 method overrides TypedDataInterface::setValue()
- TypedData::setValue in core/
lib/ Drupal/ Core/ TypedData/ TypedData.php - Sets the data value.
File
-
core/
lib/ Drupal/ Core/ TypedData/ TypedDataInterface.php, line 66
Class
- TypedDataInterface
- Interface for typed data objects.
Namespace
Drupal\Core\TypedDataCode
public function setValue($value, $notify = TRUE);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.