]> dev.renevier.net Git - syj.git/blob - application/views/helpers/LogoutLink.php
use url view helper
[syj.git] / application / views / helpers / LogoutLink.php
1 <?php
2 /*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3     and is published under the AGPL license. */
4
5 class Syj_View_Helper_LogoutLink extends Zend_View_Helper_Abstract
6 {
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'));
13     }
14 }