public function 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

\Drupal\Core\TypedData\ReadOnlyException If the data is read-only.

4 methods override TypedDataInterface::setValue()
Entity::setValue in drupal/core/lib/Drupal/Core/Entity/Entity.php
Implements \Drupal\Core\TypedData\TypedDataInterface::setValue().
EntityBCDecorator::setValue in drupal/core/lib/Drupal/Core/Entity/EntityBCDecorator.php
Forwards the call to the decorated entity.
TypedData::setValue in drupal/core/lib/Drupal/Core/TypedData/TypedData.php
Implements \Drupal\Core\TypedData\TypedDataInterface::setValue().
ViewUI::setValue in drupal/core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php
Implements \Drupal\Core\TypedData\TypedDataInterface::setValue().

File

drupal/core/lib/Drupal/Core/TypedData/TypedDataInterface.php, line 54
Contains \Drupal\Core\TypedData\TypedDataInterface.

Class

TypedDataInterface
Interface for typed data objects.

Namespace

Drupal\Core\TypedData

Code

public function setValue($value, $notify = TRUE);