You are here

public static function ConfigHandler::setCronLastRun in DB Maintenance 2.0.x

Same name and namespace in other branches
  1. 8 src/Module/Config/ConfigHandler.php \Drupal\db_maintenance\Module\Config\ConfigHandler::setCronLastRun()

Sets last cron run.

1 call to ConfigHandler::setCronLastRun()
DbHandler::optimizeTables in src/Module/Db/DbHandler.php
Performs the maintenance.

File

src/Module/Config/ConfigHandler.php, line 26
ConfigHandler class.

Class

ConfigHandler
ConfigHandler class.

Namespace

Drupal\db_maintenance\Module\Config

Code

public static function setCronLastRun($value) {
  $config = \Drupal::configFactory()
    ->getEditable('db_maintenance.settings');
  $config
    ->set('cron_last_run', $value);
  $config
    ->save();
}