public function SmartDateItem::onChange in Smart Date 3.2.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::onChange()
- 8 src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::onChange()
- 3.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::onChange()
- 3.0.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::onChange()
- 3.1.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::onChange()
- 3.3.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::onChange()
- 3.4.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::onChange()
Parameters
$property_name: The name of the property.
bool $notify: (optional) Whether to forward the notification to the parent. Defaults to TRUE. By passing FALSE, overrides of this method can re-use the logic of parent classes without triggering notification.
Overrides Map::onChange
File
- src/
Plugin/ Field/ FieldType/ SmartDateItem.php, line 156
Class
- SmartDateItem
- Plugin implementation of the 'smartdate' field type.
Namespace
Drupal\smart_date\Plugin\Field\FieldTypeCode
public function onChange($property_name, $notify = TRUE) {
// Enforce that the computed date is recalculated.
if ($property_name == 'value') {
$this->start_time = NULL;
}
elseif ($property_name == 'end_value') {
$this->end_time = NULL;
}
parent::onChange($property_name, $notify);
}