Exemplo n.º 1
0
 /**
  * @param string $path without starting slash
  * @param string|null $path without starting slash
  */
 protected function addJsFile($path, $srcPathsuffix = null)
 {
     MyWebloader::addJsFile($this->buildSrcPath(), $path, $srcPathsuffix);
 }
Exemplo n.º 2
0
 /**
  * adds js files to presenter's controlsJs array
  *
  * @param mixed $files
  */
 public static function addJsScript($files)
 {
     if (is_null(self::$presenter)) {
         throw new Exception('Cannot add css files before control is attached to presenter');
     }
     // called from macros
     //		if (func_num_args() > 1) {
     if (!is_array($files)) {
         $files = func_get_args();
     }
     foreach ($files as $v) {
         if (is_array($v)) {
             MyWebloader::addJsFile(self::$webloaderSrcPath, $v[0], $v[1]);
         } else {
             MyWebloader::addJsFile(self::$webloaderSrcPath, $v);
         }
     }
 }