Esempio n. 1
0
 /**
  * @param array $app
  * @param array $config
  * @throws AppException
  */
 public function __construct($app, $config = array())
 {
     parent::__construct($app, $config);
     $this->_jbrequest = $this->app->jbrequest;
     $task = $this->_jbrequest->getWord('task');
     $ctrl = $this->_jbrequest->getCtrl();
     if (!method_exists($this, $task)) {
         throw new AppException('Action method not found!  ' . $ctrl . ' :: ' . $task . '()');
     }
     // internal vars
     $this->application = $this->app->zoo->getApplication();
     $this->_params = $this->application->getParams('frontpage');
     $this->joomla = $this->app->system->application;
     $isSite = $this->app->jbenv->isSite();
     if (!$isSite) {
         $this->app->document->addStylesheet("root:administrator/templates/system/css/system.css");
         $this->app->jbassets->uikit(true, true);
         $this->_setToolbarTitle();
     } else {
         $this->params = $this->joomla->getParams();
         $this->pathway = $this->joomla->getPathway();
         $this->app->jbassets->setAppCSS();
         $this->app->jbassets->setAppJS();
     }
     $this->_config = JBModelConfig::model();
 }