doctype() ?> getHelperPluginManager()->getServiceLocator(); $translator = $services->get('translator'); $locale = $translator->getLocale(); $fallbackLocale = $translator->getFallbackLocale(); // meta tags echo $this->headMeta() ->appendHttpEquiv('content-type', 'text/html; charset=utf-8') ->appendHttpEquiv('X-UA-Compatible', 'IE=Edge') ->appendName('viewport', 'width=device-width, initial-scale=1.0'); // output title $this->headTitle() ->setSeparator(' - ') ->prepend('Swarm'); echo $this->headTitle(); // we extend the head link and head script helpers to add in our default css/scripts automatically // we will also include anything under public/custom/*.(js|css) or public/custom/*/*.(js|css) // link tags (icons, stylesheets) $this->headLink(array('rel' => 'shortcut icon', 'href' => $this->basePath() . '/favicon.ico?v2')); $this->headLink(array('rel' => 'apple-touch-icon', 'href' => $this->basePath() . '/apple-touch-icon.png')); echo $this->headLink(); // javascript $initTranslator = 'swarm.translator.init(' . json_encode($locale) . ', ' . json_encode($fallbackLocale) . ');'; echo $this->headScript() ->addConfiguredScripts() ->addLanguageScripts($locale, $fallbackLocale) ->addCustomScripts() ->appendScript($initTranslator); ?> user(); $permissions = $this->permissions(); $services = $this->getHelperPluginManager()->getServiceLocator(); $route = $services->get('application')->getMvcEvent()->getRouteMatch(); $this->bodyClass()->append('route-' . $route->getMatchedRouteName()); $this->bodyClass()->append($user->getId() ? 'authenticated' : 'anonymous'); $this->bodyClass()->append($permissions->is('admin') ? 'admin' : 'non-admin'); $this->bodyClass()->append($permissions->is('projectAddAllowed') ? 'can-add-project' : 'cannot-add-project'); $this->bodyClass()->append('locale-' . $locale); // embed user info in data attr on body tag $userData = $user->getId() ? array( 'id' => $user->getId(), 'name' => $user->getFullName(), 'email' => $user->getEmail(), 'avatar' => $this->avatar($user, 64), ) : null; ?> getParam('project')): ?> data-project="getParam('project')) && method_exists($route->getParam('project', 'getId'))) { echo $route->getParam('project')->getId(); } else { echo $route->getParam('project'); } ?>" data-csrf="csrf() ?>" data-locale="escapeHtmlAttr($locale) ?>" data-fallback-locale="escapeHtmlAttr($fallbackLocale) ?>" data-base-url="escapeHtmlAttr($services->get('application')->getRequest()->getBaseUrl()) ?>">