getJs() 공개 메소드

public getJs ( ) : Flarum\Asset\CompilerInterface
리턴 Flarum\Asset\CompilerInterface
예제 #1
0
 public function addAssets($files)
 {
     foreach ((array) $files as $file) {
         $ext = pathinfo($file, PATHINFO_EXTENSION);
         switch ($ext) {
             case 'js':
                 $this->view->getJs()->addFile($file);
                 break;
             case 'css':
             case 'less':
                 $this->view->getCss()->addFile($file);
                 break;
         }
     }
 }
예제 #2
0
 /**
  * @param WebAppView $view
  */
 private function addDefaultAssets(WebAppView $view)
 {
     $root = __DIR__ . '/../../..';
     $name = $this->getName();
     $view->getJs()->addFile("{$root}/js/{$name}/dist/app.js");
     $view->getCss()->addFile("{$root}/less/{$name}/app.less");
 }