You are here

public function ArchiveDownloader::canDownload in Content Synchronizer 3.x

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

Return true if the current page is admin.

Return value

bool True if can download.

See also

https://drupal.stackexchange.com/questions/219370/how-to-test-if-current...

1 call to ArchiveDownloader::canDownload()
ArchiveDownloader::donwloadArchive in src/Service/ArchiveDownloader.php
Donwload archive by adding js library.

File

src/Service/ArchiveDownloader.php, line 70

Class

ArchiveDownloader
Class ArchiveDownloader.

Namespace

Drupal\content_synchronizer\Service

Code

public function canDownload() {
  return User::load($this->currentUser
    ->id())
    ->hasPermission('add export entity entities');
}