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 $encodeduri = implode('/', array_map('urlencode', explode('/', $currentUri)));
10 $translatedString = $this->view->translate('logout');
11 $href = $this->view->addParamToUrl('logout', 'redirect', $encodeduri, true);
12 return $this->view->anchor($href, $translatedString, array('id' => 'logout', 'class' => 'login-anchor'));