You are here

public function ArchiveDownloader::donwloadArchive in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Service/ArchiveDownloader.php \Drupal\content_synchronizer\Service\ArchiveDownloader::donwloadArchive()
  2. 3.x src/Service/ArchiveDownloader.php \Drupal\content_synchronizer\Service\ArchiveDownloader::donwloadArchive()

Donwload archive by adding js library.

Parameters

array $vars: Preprocess data.

File

src/Service/ArchiveDownloader.php, line 26

Class

ArchiveDownloader
Class ArchiveDownloader.

Namespace

Drupal\content_synchronizer\Service

Code

public function donwloadArchive(array &$vars) {
  if ($this
    ->canDownload()) {
    $vars['#attached']['library'][] = 'content_synchronizer/download_archive';
  }
}