You are here

public function ReportFile::__construct in Forena Reports 7.5

Constructor Sets the initial reort directory

Overrides FileBase::__construct

File

src/File/ReportFile.php, line 12

Class

ReportFile

Namespace

Drupal\forena\File

Code

public function __construct() {

  // Load default directory from configuration.
  $report_path = variable_get('forena_report_repos', '');
  if (!$report_path) {
    $report_path = variable_get('file_' . file_default_scheme() . '_path', conf_path() . '/files/reports');
  }
  $default_directory = rtrim($report_path, '/');
  $directories = module_invoke_all('forena_report_directory');
  foreach ($directories as $dir) {
    $this->includes[] = rtrim($dir, '/');
  }

  // Parent constructor.
  parent::__construct($default_directory, $directories, array(
    'frx',
    'skinfo',
    'css',
    'js',
  ));
}