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 . ': </strong>';
+
+ $i = 1;
+ foreach( $opciones as $opcion){
+
+ $xhtml .= $link->htmlLinkArray($opcion, $base);
+
+ if(count($opciones) != $i){
+ $xhtml .= ' > ';
+ }
+
+ $i++;
+ }
+
+ return $xhtml;
+
+ }else{
+
+ return NULL;
+
+ }
+ }
+}
\ No newline at end of file