You are here

function template_preprocess_hacked_project_summary in Hacked! 8.2

Parameters

$variables:

File

./hacked.report.inc, line 212

Code

function template_preprocess_hacked_project_summary(&$variables) {
  $project = $variables['project'];
  $changes[] = \Drupal::translation()
    ->formatPlural($project['counts']['different'], '1 file changed', '@count files changed');
  $changes[] = \Drupal::translation()
    ->formatPlural($project['counts']['missing'], '1 file deleted', '@count files deleted');
  if ($project['counts']['access_denied'] > 0) {
    $changes[] = \Drupal::translation()
      ->formatPlural($project['counts']['access_denied'], '1 unreadable file', '@count unreadable files');
  }
  $variables['changes'] = implode(', ', $changes);
  $variables['link'] = Url::fromRoute('hacked.project', [
    'project' => $project['project_name'],
  ]);
}