Exemplo n.º 1
0
 public function __construct()
 {
     // Define Joomla's app
     $this->app = JFactory::getApplication();
     $this->input = $this->app->input;
     // Load configuration object.
     $config = FD::config();
     $jConfig = FD::jconfig();
     // Define the current logged in user or guest
     if (is_null(self::$user)) {
         self::$user = FD::user();
     }
     // Define the current logged in user's access.
     if (is_null(self::$userAccess)) {
         self::$userAccess = FD::access();
     }
     if (is_null(self::$tmplMode)) {
         self::$tmplMode = $this->input->get('tmpl', '', 'default');
     }
     // Get the current access
     $this->my = self::$user;
     $this->access = self::$userAccess;
     // Define our own configuration
     $this->config = $config;
     // Define template's own configuration
     if (is_null(self::$templateConfig)) {
         self::$templateConfig = $this->getConfig();
     }
     $this->template = self::$templateConfig;
     // Define Joomla's configuration so the world can use it.
     $this->jConfig = $jConfig;
     // Determine if the current request has tmpl=xxx
     $this->tmpl = self::$tmplMode;
 }