You are here

public function ScanResultFormatter::__construct in Upgrade Status 8

Same name and namespace in other branches
  1. 8.3 src/ScanResultFormatter.php \Drupal\upgrade_status\ScanResultFormatter::__construct()
  2. 8.2 src/ScanResultFormatter.php \Drupal\upgrade_status\ScanResultFormatter::__construct()

Constructs a \Drupal\upgrade_status\Controller\ScanResultFormatter.

Parameters

\Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory: The key/value factory.

\Drupal\Core\Datetime\DateFormatterInterface $dateFormatter: The date formatter service.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

File

src/ScanResultFormatter.php, line 51

Class

ScanResultFormatter
Format scan results for display or export.

Namespace

Drupal\upgrade_status

Code

public function __construct(KeyValueFactoryInterface $key_value_factory, DateFormatterInterface $dateFormatter, TimeInterface $time) {
  $this->scanResultStorage = $key_value_factory
    ->get('upgrade_status_scan_results');
  $this->dateFormatter = $dateFormatter;
  $this->time = $time;
}