public function EntityNG::set

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

Overrides Entity::set

2 calls to EntityNG::set()
User::addRole in drupal/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php
Add a role to a user.
User::removeRole in drupal/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/User.php
Remove a role from a user.

File

drupal/core/lib/Drupal/Core/Entity/EntityNG.php, line 244
Contains \Drupal\Core\Entity\EntityNG.

Class

EntityNG
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

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