/** * Returns the Xajax Javascript header and wrapper code to be printed into the page * * The javascript code returned by this function is dependent on the plugins * that are included and the functions and classes that are registered. * * @param boolean $bIncludeJs Also get the JS files * @param boolean $bIncludeCss Also get the CSS files * * @return string */ public function getScript($bIncludeJs = false, $bIncludeCss = false) { if (!$this->getOption('core.request.uri')) { $this->setOption('core.request.uri', URI::detect()); } $sCode = ''; if ($bIncludeCss) { $sCode .= $this->xPluginManager->getCss() . "\n"; } if ($bIncludeJs) { $sCode .= $this->xPluginManager->getJs() . "\n"; } $sCode .= $this->xPluginManager->getScript(); return $sCode; }