Use getBaseUrl() instead of detectBaseUrl()
[zf2.biz/galerie.git] / module / Application / Module.php
index fc85ebb..2e5dc4e 100644 (file)
@@ -31,7 +31,7 @@ class Module implements AutoloaderProvider
         );
     }
 
-    public function getConfig($env = null)
+    public function getConfig()
     {
         return include __DIR__ . '/config/module.config.php';
     }
@@ -67,14 +67,24 @@ class Module implements AutoloaderProvider
             return $this->view;
         }
 
-        $di     = $app->getLocator();
-        $view   = $di->get('view');
-        $url    = $view->plugin('url');
+        $locator = $app->getLocator();
+        $view    = $locator->get('view');
+        $url     = $view->plugin('url');
         $url->setRouter($app->getRouter());
 
         $view->plugin('headTitle')->setSeparator(' - ')
                                   ->setAutoEscape(false)
-                                  ->append('Application');
+                                  ->append('ZF2 Skeleton Application');
+
+        $basePath = $app->getRequest()->getBaseUrl();
+
+        $view->plugin('headLink')->appendStylesheet($basePath . '/css/bootstrap.min.css');
+
+        $html5js = '<script src="' . $basePath . '/js/html5.js"></script>';
+        $view->plugin('placeHolder')->__invoke('html5js')->set($html5js);
+        $favicon = '<link rel="shortcut icon" href="' . $basePath . '/images/favicon.ico">';
+        $view->plugin('placeHolder')->__invoke('favicon')->set($favicon);
+
         $this->view = $view;
         return $view;
     }