protected function Micon::archiveDecode in Micon 2.x
Same name and namespace in other branches
- 8 src/Entity/Micon.php \Drupal\micon\Entity\Micon::archiveDecode()
Take base64 encoded archive and save it to a temporary file for extraction.
1 call to Micon::archiveDecode()
- Micon::preSave in src/
Entity/ Micon.php - Acts on an entity before the presave hook is invoked.
File
- src/
Entity/ Micon.php, line 264
Class
- Micon
- Defines the Micon entity.
Namespace
Drupal\micon\EntityCode
protected function archiveDecode() {
$data = $this
->getArchive();
$zip_path = 'temporary://' . $this
->id() . '.zip';
file_put_contents($zip_path, $data);
$this
->archiveExtract($zip_path);
}