You are here

public function ColorItemInterface::setHexadecimal in Color API 8

Set the 'hexadecimal' property of the Color Field 'Color' property.

Parameters

string $color: The hexadecimal string value representing the color.

bool $notify: 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.

1 method overrides ColorItemInterface::setHexadecimal()
ColorItem::setHexadecimal in src/Plugin/Field/FieldType/ColorItem.php
Set the 'hexadecimal' property of the Color Field 'Color' property.

File

src/Plugin/Field/FieldType/ColorItemInterface.php, line 75

Class

ColorItemInterface
Interface for Field API Color items.

Namespace

Drupal\colorapi\Plugin\Field\FieldType

Code

public function setHexadecimal($color, $notify = TRUE);