getRequest()->getRequestUri(); if (strpos($currentUri, '?') !== false) { $currentUri = strstr($currentUri, '?', true); } $translatedString = $this->view->translate('logout'); $href = $this->view->addParamToUrl('logout', 'redirect', $currentUri, true); return $this->view->anchor($href, $translatedString, array('id' => 'logout', 'class' => 'login-anchor')); } }