You are here

public function ColorData::setValue in Color API 8

Overrides \Drupal\Core\TypedData\TypedData::setValue().

Parameters

array|null $values: An array of property values.

Overrides Map::setValue

File

src/Plugin/DataType/ColorData.php, line 30

Class

ColorData
Provides the Color Typed Data type.

Namespace

Drupal\colorapi\Plugin\DataType

Code

public function setValue($values, $notify = TRUE) {
  $this
    ->setHexadecimal($values['hexadecimal'], $notify);
  $this
    ->setRgb($values['rgb'], $notify);
}