public function DateRecurItem::isEmpty in Recurring Dates Field 3.1.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::isEmpty()
- 8 src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::isEmpty()
- 3.x src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::isEmpty()
- 3.0.x src/Plugin/Field/FieldType/DateRecurItem.php \Drupal\date_recur\Plugin\Field\FieldType\DateRecurItem::isEmpty()
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides DateRangeItem::isEmpty
File
- src/
Plugin/ Field/ FieldType/ DateRecurItem.php, line 453
Class
- DateRecurItem
- Plugin implementation of the 'date_recur' field type.
Namespace
Drupal\date_recur\Plugin\Field\FieldTypeCode
public function isEmpty() : bool {
$start_value = $this
->get('value')
->getValue();
$end_value = $this
->get('end_value')
->getValue();
return $start_value === NULL || $start_value === '' || ($end_value === NULL || $end_value === '') || empty($this
->get('timezone')
->getValue());
}