[surforce-library commit] r29 - trunk/library/Zsurforce/View/Helper

0 views
Skip to first unread message

codesite...@google.com

unread,
Aug 4, 2008, 6:20:18 PM8/4/08
to surforce...@googlegroups.com
Author: pablos.benitez
Date: Mon Aug 4 15:19:58 2008
New Revision: 29

Added:
trunk/library/Zsurforce/View/Helper/HtmlBreadcrum.php

Log:
Agregamos helper para generar breadcrum.

Added: trunk/library/Zsurforce/View/Helper/HtmlBreadcrum.php
==============================================================================
--- (empty file)
+++ trunk/library/Zsurforce/View/Helper/HtmlBreadcrum.php Mon Aug 4 15:19:58 2008
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Genera breadcrum
+ *
+ * @category SURFORCE
+ * @package SURFORCE-LIBRARY
+ * @license GPL v2
+ */
+class Zsurforce_View_Helper_HtmlBreadcrum
+{
+ /**
+ * Genera menú horizontal
+ *
+ * @param array $opciones
+ * @param string $menu el texto que debe llevar a modo de descripción inicia
+ * @param string $base ruta base
+ *
+ * @return string The element XHTML.
+ */
+ public function htmlBreadcrum($opciones = array(), $menu = "menu", $base = null)
+ {
+
+ if(count($opciones) > 0){
+ $link = new Zsurforce_View_Helper_HtmlLinkArray();
+
+ $xhtml = '<strong>' . $menu . ':&nbsp;</strong>';
+
+ $i = 1;
+ foreach( $opciones as $opcion){
+
+ $xhtml .= $link->htmlLinkArray($opcion, $base);
+
+ if(count($opciones) != $i){
+ $xhtml .= '&nbsp;&gt;&nbsp;';
+ }
+
+ $i++;
+ }
+
+ return $xhtml;
+
+ }else{
+
+ return NULL;
+
+ }
+ }
+}
\ No newline at end of file

Reply all
Reply to author
Forward
0 new messages