protected function FlippingBookForm::prepareExport in Flipping Book 8
Prepare export.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: Form state instance.
1 call to FlippingBookForm::prepareExport()
- FlippingBookForm::handleArchive in src/
Form/ FlippingBookForm.php - Handle uploaded archive.
File
- src/
Form/ FlippingBookForm.php, line 230
Class
- FlippingBookForm
- Form controller for Flipping Book edit forms.
Namespace
Drupal\flipping_book\FormCode
protected function prepareExport(FormStateInterface $form_state) {
$file = reset($form_state
->getValue('file'));
$file = $this
->getFileStorage()
->load($file['fids'][0]);
$file
->setPermanent();
$file
->save();
$info = $this->flippingBook
->prepareExportDirectory($file, $this
->getUploadLocation());
$this->filepath = $info['filepath'];
$this->destination = $info['destination'];
}