Example #1
0
 /**
  * Returns the Name of the Rendering Engine.
  * Returns Json if an XMLHttpRequest is given.
  * Returns Smarty as default if no rendering engine is set.
  *
  * @return string object, smarty as default
  */
 public function getRenderEngineName()
 {
     // check if the requesttype is xmlhttprequest (ajax) is incomming, then we will return data in json format
     if ($this->request->isAjax()) {
         $this->setRenderEngine('json');
     }
     // use smarty as default, if renderEngine is not set and it's not an ajax request
     if (empty($this->renderEngineName)) {
         $this->setRenderEngine('smarty');
     }
     return $this->renderEngineName;
 }
Example #2
0
 public static function getAjaxMode()
 {
     return HttpRequest::isAjax();
 }