You are here

public function Minisite::setArchiveFile in Mini site 8

Set archive file.

Parameters

\Drupal\file\FileInterface $file: Already uploaded archive file object to set.

Overrides MinisiteInterface::setArchiveFile

1 call to Minisite::setArchiveFile()
Minisite::__construct in src/Minisite.php
Minisite constructor.

File

src/Minisite.php, line 172

Class

Minisite
Class Minisite.

Namespace

Drupal\minisite

Code

public function setArchiveFile(FileInterface $file) {
  static::validateArchive($file, $this->allowedExtensions);
  $this->archiveFile = $file;

  // Always process archive when file changes. This does not
  // necessarily mean extracting the archive into new directory every time
  // this method is called but will guarantee that the archive have
  // been extracted and all files are ready.
  $this
    ->processArchive();
}