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_FooterLink extends Zend_View_Helper_Abstract
7 public function FooterLink($routeoptions, $text, $redirect=true, $extraclass=null, $extratext="") {
8 $page = new Zend_Navigation_Page_Mvc($routeoptions);
9 if ($page->isActive()) {
10 $link = $this->view->escape($text);
12 $href = $page->getHRef();
14 $currentUri = $this->view->url();
15 $href = $this->view->addParamToUrl($href, 'redirect', $currentUri, true);
17 $link = $this->view->anchor($href, $text, array('class' => 'footer-anchor'));
19 $class = "footer-link";
20 if (isset($extraclass)) {
21 $class = "$class $extraclass";
23 return '<div class="' . $class . '">' . $link . $extratext . '</div>' . PHP_EOL;