You are here

public function DefaultDateRecurOccurrenceHandler::isInfinite in Recurring Dates Field 8

Does the handler have an infinitely recurring date?

Return value

bool

Overrides DateRecurOccurrenceHandlerInterface::isInfinite

File

src/Plugin/DateRecurOccurrenceHandler/DefaultDateRecurOccurrenceHandler.php, line 143

Class

DefaultDateRecurOccurrenceHandler
Provides the default occurrence handler.

Namespace

Drupal\date_recur\Plugin\DateRecurOccurrenceHandler

Code

public function isInfinite() {
  if (empty($this->item) || !$this->isRecurring) {
    return 0;
  }
  return (int) $this->rruleObject
    ->isInfinite();
}