public function DateRecurHelper::getOccurrences in Recurring Dates Field 3.1.x
Same name and namespace in other branches
- 8.2 src/DateRecurHelper.php \Drupal\date_recur\DateRecurHelper::getOccurrences()
- 3.x src/DateRecurHelper.php \Drupal\date_recur\DateRecurHelper::getOccurrences()
- 3.0.x src/DateRecurHelper.php \Drupal\date_recur\DateRecurHelper::getOccurrences()
Get all occurrences.
A limit and/or range-end must be passed.
Parameters
\DateTimeInterface|null $rangeStart: The start of the range, or start with the first available occurrence.
\DateTimeInterface|null $rangeEnd: The end of the range.
int|null $limit: A limit.
Return value
\Drupal\date_recur\DateRange[] The occurrences.
Throws
\InvalidArgumentException Exceptions thrown if ranges are invalid or undefined.
Overrides DateRecurHelperInterface::getOccurrences
File
- src/
DateRecurHelper.php, line 96
Class
- DateRecurHelper
- Helper for recurring rules.
Namespace
Drupal\date_recurCode
public function getOccurrences(\DateTimeInterface $rangeStart = NULL, ?\DateTimeInterface $rangeEnd = NULL, ?int $limit = NULL) : array {
return $this->dateRecurHelper
->getOccurrences($rangeStart, $rangeEnd, $limit);
}