Skip to content
Snippets Groups Projects
Commit 7b9319a0 authored by gloas's avatar gloas
Browse files

Graphique: ajout over sur <a> TagAnchor

parent e7fbf7e9
Branches
Tags
No related merge requests found
......@@ -35,7 +35,8 @@ class ZendAfi_View_Helper_Notice_FacettesTypeDoc extends Zend_View_Helper_HtmlEl
public function renderFacette($id, $libelle, $nombre) {
return $this->view->tagAnchor(['facette' => $id], $nombre,
['class' => 'type_doc_'.substr($id, 1 )]);
['class' => 'type_doc_'.substr($id, 1 ),
'libelle' => $libelle]);
}
}
......
......@@ -26,9 +26,13 @@ class ZendAfi_View_Helper_TagAnchor extends Zend_View_Helper_HtmlElement {
* @return string
*/
public function tagAnchor($url, $text, array $attribs = array()) {
$libelle='';
if(array_key_exists('libelle',$attribs)){
$libelle = $attribs['libelle'];
}
if (is_array($url))
$url = $this->view->url($url);
return '<a href="'. $url .'"'. $this->_htmlAttribs($attribs) . '>' . $text . '</a>';
return '<a href="'. $url .'"'. $this->_htmlAttribs($attribs) . ' title="'.$libelle.'">' . $text . '</a>';
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment