Example #1
0
 /**
  * Returns the code to include a JavaScript file.
  *
  * @param string $file The path to the JavaScript file
  *
  * @return string
  */
 public static function jsIncTag($path)
 {
     if (strpos($path, 'http') === false and strpos($path, '//') === false) {
         $path = Request::basePath($path);
     }
     return '<script src="' . $path . '" type="text/javascript"></script>' . PHP_EOL;
 }