Exemplo n.º 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;
     }
 }
Exemplo n.º 2
0
 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);
 }