Example #1
0
 /**
  * @param $key string
  *
  * @return string
  */
 public function trans($key)
 {
     if (!$this->translator) {
         return $key;
     }
     return $this->translator->trans($key);
 }
Example #2
0
 /**
  * @param DrupalStyle $io
  * @param array       $files
  * @param string      $headerKey
  * @param string      $pathKey
  * @param string      $path
  */
 private function showFiles($io, $files, $headerKey, $pathKey, $path)
 {
     if (!$files) {
         return;
     }
     $io->writeln($this->translator->trans($headerKey));
     $io->info(sprintf('%s:', $this->translator->trans($pathKey)), false);
     $io->comment($path, false);
     $io->newLine();
     $index = 1;
     foreach ($files as $file) {
         $this->showFile($io, $file, $index);
         ++$index;
     }
 }