2 /* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3 and is published under the AGPL license. */
5 class Syj_View_Helper_LogoutLink extends Zend_View_Helper_Abstract
7 public function logoutLink() {
8 $currentUri = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();
9 if (strpos($currentUri, '?') !== false) {
10 $currentUri = strstr($currentUri, '?', true);
12 $translatedString = $this->view->translate('logout');
13 $href = $this->view->addParamToUrl('logout', 'redirect', $currentUri, true);
14 return $this->view->anchor($href, $translatedString, array('id' => 'logout', 'class' => 'login-anchor'));