You are here

public function AppService::correctModulePath in Forena Reports 8

1 call to AppService::correctModulePath()
AppService::getForenaProviders in src/AppService.php

File

src/AppService.php, line 38

Class

AppService

Namespace

Drupal\forena

Code

public function correctModulePath($module, &$path) {
  if (strpos($path, '/') !== 0 && strpos($path, '..') !== 0) {
    $tmp_path = drupal_get_path('module', $module) . "/" . $path;
    if (is_dir($tmp_path)) {
      $path = $tmp_path;
    }
  }
}