public function DefaultDateRecurOccurrenceHandler::getOccurrencesForDisplay in Recurring Dates Field 8
Get a list of occurrences for display.
Must return an empty array for non-recurring dates. For recurring dates, an array of occurrences must be returned, each defining at least the following keys:
- value - DrupalDateTime
- end_value - DrupalDateTime
Additional keys may be included and may be supported by specific formatters.
Parameters
null|\DateTime|DrupalDateTime $start:
null|\DateTime|DrupalDateTime $end:
int $num:
Return value
array
Overrides DateRecurOccurrenceHandlerInterface::getOccurrencesForDisplay
1 call to DefaultDateRecurOccurrenceHandler::getOccurrencesForDisplay()
- DefaultDateRecurOccurrenceHandler::getOccurrencesForComputedProperty in src/
Plugin/ DateRecurOccurrenceHandler/ DefaultDateRecurOccurrenceHandler.php - @inheritdoc
File
- src/
Plugin/ DateRecurOccurrenceHandler/ DefaultDateRecurOccurrenceHandler.php, line 112
Class
- DefaultDateRecurOccurrenceHandler
- Provides the default occurrence handler.
Namespace
Drupal\date_recur\Plugin\DateRecurOccurrenceHandlerCode
public function getOccurrencesForDisplay($start = NULL, $end = NULL, $num = NULL) {
if (empty($this->item) || !$this->isRecurring) {
return [];
}
return $this->rruleObject
->getOccurrences($start, $end, $num);
}