You are here

public function NodeRevisionDeleteCommands::getTime in Node Revision Delete 8

Shows the frequency with which to delete revisions while cron is running.

@usage nrd-get-time Shows the actual frequency with which to delete revisions while cron is running.

@command nrd:get-time @aliases nrd-gt, nrd-get-time

File

src/Commands/NodeRevisionDeleteCommands.php, line 226

Class

NodeRevisionDeleteCommands
Class NodeRevisionDeleteCommands.

Namespace

Drupal\node_revision_delete\Commands

Code

public function getTime() {

  // Getting the config.
  $config = $this->configFactory
    ->get('node_revision_delete.settings');

  // Getting the values from the config.
  $time = $config
    ->get('node_revision_delete_time');
  $time = $this->nodeRevisionDelete
    ->getTimeValues($time);
  $message = dt('<info>The frequency with which to delete revisions while cron is running is: @time.</info>', [
    '@time' => $time,
  ]);
  $this
    ->writeln($message);
}