You are here

public function LingotekManagementForm::debugExportFinished in Lingotek Translation 8

File

src/Form/LingotekManagementForm.php, line 540
Contains \Drupal\Lingotek\Form\LingotekManagementForm.

Class

LingotekManagementForm
Form for bulk management of content.

Namespace

Drupal\lingotek\Form

Code

public function debugExportFinished($success, $results, $operations) {
  if ($success) {
    $links = [];
    foreach ($results['exported'] as $result) {
      $links[] = [
        '#theme' => 'file_link',
        '#file' => File::load($result),
      ];
    }
    $build = [
      '#theme' => 'item_list',
      '#items' => $links,
    ];
    drupal_set_message($this
      ->t('Exports available at: @exports', [
      '@exports' => drupal_render($build),
    ]));
  }
}