public function ChartConfigItem::setValue in Charts 5.0.x
Same name and namespace in other branches
- 8.4 src/Plugin/Field/FieldType/ChartConfigItem.php \Drupal\charts\Plugin\Field\FieldType\ChartConfigItem::setValue()
Overrides \Drupal\Core\TypedData\TypedData::setValue().
Parameters
array|null $values: An array of property values.
bool $notify: (optional) 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 FieldItemBase::setValue
File
- src/
Plugin/ Field/ FieldType/ ChartConfigItem.php, line 85
Class
- ChartConfigItem
- Plugin implementation of the 'chart_config' field type.
Namespace
Drupal\charts\Plugin\Field\FieldTypeCode
public function setValue($values, $notify = TRUE) {
if (isset($values) && isset($values['config'])) {
$values['library'] = $values['config']['library'];
$values['type'] = $values['config']['type'];
}
parent::setValue($values, $notify);
}