public function EntityWrapper::set

Implements \Drupal\Core\TypedData\ComplexDataInterface::set().

Overrides ComplexDataInterface::set

File

drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php, line 149
Contains \Drupal\Core\Entity\Field\Type\EntityWrapper.

Class

EntityWrapper
Defines an 'entity' data type, e.g. the computed 'entity' property of entity references.

Namespace

Drupal\Core\Entity\Field\Type

Code

public function set($property_name, $value, $notify = TRUE) {
  $this
    ->get($property_name)
    ->setValue($value, FALSE);
}