You are here

public function Profile::setData in Profile 8

Sets a profile data value with the given key.

Parameters

string $key: The key.

mixed $value: The value.

Return value

$this

Overrides ProfileInterface::setData

File

src/Entity/Profile.php, line 153

Class

Profile
Defines the profile entity class.

Namespace

Drupal\profile\Entity

Code

public function setData($key, $value) {
  $this
    ->get('data')
    ->__set($key, $value);
  return $this;
}