You are here

public static function TincanService::getPackageName 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::getPackageName()

Gives the package name, after being renamed by the system if it happened.

Parameters

object $file: The package file.

Return value

string The package name.

1 call to TincanService::getPackageName()
TincanService::getExtractPath in ActivityTypes/opigno_tincan_activity/src/TincanService.php
This method gives the path to the extracted package.

File

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

Class

TincanService
Class TincanService.

Namespace

Drupal\opigno_tincan_activity

Code

public static function getPackageName($file) {
  $file_full_name = $file
    ->getFileName();
  $file_name_parts = explode('.', $file_full_name);
  return $file_name_parts[0];
}