コード例 #1
0
 /**
  * includeHead
  *
  * @param RendererInterface|PhpRenderer $view
  * @param string                        $type
  * @param string                        $path
  *
  * @return void
  */
 public function includeHead(RendererInterface $view, $type, $path)
 {
     switch ($type) {
         case 'css':
             $view->headLink()->appendStylesheet($path);
             break;
         case 'js':
             $view->headScript()->appendFile($path);
             break;
     }
 }
コード例 #2
0
ファイル: Header.php プロジェクト: ControleOnline/core
 public static function addJsLib(\Zend\View\Renderer\RendererInterface $renderer, $src, $type = 'text/javascript', $attrs = array())
 {
     $attrs['data-type'] = 'lib';
     self::$renderer = $renderer;
     self::$renderer->headScript()->setAllowArbitraryAttributes(true)->appendFile(self::$renderer->basePath($src), $type, $attrs);
 }