Unlimited.php in Recurring Time Period 8
File
src/Plugin/RecurringPeriod/Unlimited.php
View source
<?php
namespace Drupal\recurring_period\Plugin\RecurringPeriod;
use Drupal\Core\Form\FormStateInterface;
class Unlimited extends RecurringPeriodBase {
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$config = $this->configuration;
$form['description'] = [
'#markup' => 'Unlimited.',
];
return $form;
}
public function calculateDate(\DateTimeImmutable $start) {
return self::UNLIMITED;
}
public function calculateStart(\DateTimeImmutable $date) {
return self::UNLIMITED;
}
public function calculateEnd(\DateTimeImmutable $start) {
return self::UNLIMITED;
}
}