Example #1
0
 public function generateJavascript()
 {
     $this->dispatchEvent('onGenerateJavascriptBefore');
     $content = "";
     if (!file_exists(Application::getIncludePath() . DIRECTORY_SEPARATOR . $this->pathJavscriptTemplateFile())) {
         return "";
     }
     ob_start();
     include $this->pathJavscriptTemplateFile();
     $content = ob_get_contents();
     ob_end_clean();
     $this->dispatchEvent('onGenerateJavascriptAfter');
     return $this->getPrependJavscript() . $content . $this->getAppendJavascript();
 }