public function SitewideAlertManager::nextScheduledChange in Sitewide Alert 8
The time of the next scheduled change of alerts.
Return value
\Drupal\Core\Datetime\DrupalDateTime|null Time of next scheduled change of alerts; null if nothing is scheduled to change.
File
- src/
SitewideAlertManager.php, line 92
Class
Namespace
Drupal\sitewide_alertCode
public function nextScheduledChange() {
$nextExpiring = $this
->soonestExpiringVisibleScheduledAlertDateTime();
$nextShowing = $this
->soonestAppearingScheduledAlertDateTime();
if ($nextExpiring && $nextShowing) {
return $nextShowing > $nextExpiring ? $nextExpiring : $nextShowing;
}
if ($nextShowing) {
return $nextShowing;
}
if ($nextExpiring) {
return $nextExpiring;
}
return NULL;
}