You are here

public function SiteAuditCheckCronLast::getResultInfo in Site Audit 8.2

Same name and namespace in other branches
  1. 7 Check/Cron/Last.php \SiteAuditCheckCronLast::getResultInfo()

Implements \SiteAudit\Check\Abstract\getResultInfo().

Overrides SiteAuditCheckAbstract::getResultInfo

File

Check/Cron/Last.php, line 34
Contains \SiteAudit\Check\Cron\Last.

Class

SiteAuditCheckCronLast
Class SiteAuditCheckCronLast.

Code

public function getResultInfo() {
  if ($this->registry['cron_last']) {
    return dt('Cron last ran at @date (@ago ago)', array(
      '@date' => date('r', $this->registry['cron_last']),
      '@ago' => \Drupal::service('date.formatter')
        ->formatInterval(time() - $this->registry['cron_last']),
    ));
  }
  return dt('Cron has never run.');
}