public function DateRecurItem::setValue in Recurring Dates Field 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::setValue()
- 3.0.x src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::setValue()
- 3.1.x src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::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/ DateRecurItem.php, line 376
Class
- DateRecurItem
- Plugin implementation of the 'date_recur' field type.
Namespace
Drupal\date_recur\Plugin\Field\FieldTypeCode
public function setValue($values, $notify = TRUE) : void {
// Cast infinite to boolean on load.
$values['infinite'] = !empty($values['infinite']);
// All values are going to be overwritten atomically.
$this
->resetHelper();
parent::setValue($values, $notify);
}