You are here

public function AppService::findLibrary in Forena Reports 8

Use host application specificy to find the location of a library.

File

src/AppService.php, line 120

Class

AppService

Namespace

Drupal\forena

Code

public function findLibrary($library) {
  $libraries = array(
    'dataTables' => 'dataTables/media/js/jquery.dataTables.min.js',
    'mpdf' => 'mpdf/mpdf.php',
    'SVGGraph' => 'SVGGraph/SVGGraph.php',
    'prince' => 'prince/prince.php',
  );
  $path = isset($libraries[$library]) && file_exists('libraries/' . $libraries[$library]) ? 'libraries/' . $libraries[$library] : '';
  return $path;
}