public function DateRecurNonRecurringHelper::__construct in Recurring Dates Field 3.0.x
Same name and namespace in other branches
- 8.2 src/DateRecurNonRecurringHelper.php \Drupal\date_recur\DateRecurNonRecurringHelper::__construct()
- 3.x src/DateRecurNonRecurringHelper.php \Drupal\date_recur\DateRecurNonRecurringHelper::__construct()
- 3.1.x src/DateRecurNonRecurringHelper.php \Drupal\date_recur\DateRecurNonRecurringHelper::__construct()
Constructor for DateRecurNonRecurringHelper.
Parameters
\DateTimeInterface $dtStart: The initial occurrence start date.
\DateTimeInterface|null $dtStartEnd: The initial occurrence end date, or NULL to use start date.
File
- src/
DateRecurNonRecurringHelper.php, line 27
Class
- DateRecurNonRecurringHelper
- Dummy helper for handling non-recurring values.
Namespace
Drupal\date_recurCode
public function __construct(\DateTimeInterface $dtStart, \DateTimeInterface $dtStartEnd = NULL) {
$dtStartEnd = $dtStartEnd ?? clone $dtStart;
$this->occurrences = [
new DateRange($dtStart, $dtStartEnd),
];
}