You are here

public function FrxData::__construct in Forena Reports 7.4

Constructor to initialize drupal site specific settings.

Overrides FrxContext::__construct

File

./FrxData.inc, line 26

Class

FrxData

Code

public function __construct() {
  $site = array();
  global $language;
  global $user;
  global $theme_path;
  global $base_root;
  $site['base_path'] = base_path();
  $site['dir'] = rtrim(base_path(), '/');
  $site['theme_path'] = base_path() . $theme_path;
  $site['theme_dir'] =& $theme_path;
  $site['base_url'] =& $base_root;
  $site['user_name'] = $user->uid ? $user->name : '';
  $site['uid'] = $user ? $user->uid : 0;
  $site['language'] =& $language;
  $site['args'] = arg();
  $site['page'] = base_path() . $_GET['q'];
  $dest = drupal_get_destination();
  $site['destination'] = $dest['destination'];
  $this
    ->setContext('site', $site);
}