public function ColorItem::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.
Overrides ColorItemInterface::setHexadecimal
1 call to ColorItem::setHexadecimal()
- ColorItem::setValue in src/
Plugin/ Field/ FieldType/ ColorItem.php - Sets the data value.
File
- src/
Plugin/ Field/ FieldType/ ColorItem.php, line 126
Class
- ColorItem
- Provides the Color field.
Namespace
Drupal\colorapi\Plugin\Field\FieldTypeCode
public function setHexadecimal($color, $notify = TRUE) {
$this
->get('color')
->setHexadecimal($color, $notify);
}