You are here

public static function IntervalHandler::isTimeIntervalConfirmed in DB Maintenance 8

Same name and namespace in other branches
  1. 7.2 src/Module/Interval/IntervalHandler.php \Drupal\db_maintenance\Module\Interval\IntervalHandler::isTimeIntervalConfirmed()
  2. 2.0.x src/Module/Interval/IntervalHandler.php \Drupal\db_maintenance\Module\Interval\IntervalHandler::isTimeIntervalConfirmed()

Checks, if table optimization is allowed in consistency with Time Interval configuration.

1 call to IntervalHandler::isTimeIntervalConfirmed()
CommonHookHandler::hookCron in src/Module/Hook/CommonHookHandler.php
Implements hook_cron().

File

src/Module/Interval/IntervalHandler.php, line 21
IntervalHandler class.

Class

IntervalHandler
IntervalHandler class.

Namespace

Drupal\db_maintenance\Module\Interval

Code

public static function isTimeIntervalConfirmed($datetime) {

  // If Time Interval checking is not turned on,
  // allow processing without further check.
  if (!ConfigHandler::getUseTimeInterval()) {
    return TRUE;
  }
  $time_start = ConfigHandler::getTimeIntervalStart();
  $time_end = ConfigHandler::getTimeIntervalEnd();
  return self::isInInterval($datetime, $time_start, $time_end);
}