You are here

function forena_library_file in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 forena.module \forena_library_file()
  2. 7.4 forena.module \forena_library_file()

Try and locate a library in common paths. @TODO: Move this to a method on the AppService class.

6 calls to forena_library_file()
forena_forena_controls in ./forena.module
Self register controls with forena.
forena_pdf_configure in forena_pdf/forena_pdf.module
Implementation of configuration form.
forena_requirements in ./forena.module
FrxSVGGraph::__construct in src/FrxPlugin/Template/FrxSVGGraph.php
PDFGenerationConfigForm::buildForm in forena_pdf/src/Form/PDFGenerationConfigForm.php
[@inheritdoc}

... See full list

File

./forena.module, line 28

Code

function forena_library_file($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;
}