You are here

public static function TincanService::getExtractPath in Opigno module 8

Same name and namespace in other branches
  1. 3.x ActivityTypes/opigno_tincan_activity/src/TincanService.php \Drupal\opigno_tincan_activity\TincanService::getExtractPath()

This method gives the path to the extracted package.

Parameters

object $file: The extracted file.

Return value

string The path to the extracted package.

3 calls to TincanService::getExtractPath()
TincanService::getInfoFromExtractedPackage in ActivityTypes/opigno_tincan_activity/src/TincanService.php
This method will return the Activity ID and the launch file.
TincanService::saveTincanPackageInfo in ActivityTypes/opigno_tincan_activity/src/TincanService.php
Save tincan package.
TincanService::unzipPackage in ActivityTypes/opigno_tincan_activity/src/TincanService.php
This method will unzip the package to the public extracted folder.

File

ActivityTypes/opigno_tincan_activity/src/TincanService.php, line 150

Class

TincanService
Class TincanService.

Namespace

Drupal\opigno_tincan_activity

Code

public static function getExtractPath($file) {
  $filename = self::getPackageName($file);
  $filename = preg_replace([
    "/[^a-zA-Z0-9]/",
  ], "_", $filename);
  return self::PATH_PUBLIC_EXTRACTED_PACKAGE_FOLDER . $filename . '/';
}