You are here

public function DateRecurItem::onChange in Recurring Dates Field 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::onChange()
  2. 8 src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::onChange()
  3. 3.x src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::onChange()
  4. 3.1.x src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::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 DateRangeItem::onChange

File

src/Plugin/Field/FieldType/DateRecurItem.php, line 387

Class

DateRecurItem
Plugin implementation of the 'date_recur' field type.

Namespace

Drupal\date_recur\Plugin\Field\FieldType

Code

public function onChange($property_name, $notify = TRUE) {
  if (in_array($property_name, [
    'value',
    'end_value',
    'rrule',
    'timezone',
  ])) {

    // Reset cached helper instance if values changed.
    $this
      ->resetHelper();
  }
  parent::onChange($property_name, $notify);
}