Ejemplo n.º 1
0
    /**
     * Renders a breadcrumb item
     *
     * @param string $content The item content
     * @param boolean $active Whether the item is active or not
     *
     * @return string
     */
    protected static function renderItem($content, $active = false)
    {
        $item = Element::li($content);

        // If the link is not active it's the last one, don't append separator
        if ($active) {
            $item->addClass('active');
        }

        return $item;
    }
Ejemplo n.º 2
0
 /**
  * Renders a breadcrumb item
  *
  * @param string  $content The item content
  * @param boolean $active  Whether the item is active or not
  *
  * @return string
  */
 protected static function renderItem($content, $active = false)
 {
     $item = Element::li($content);
     $separator = Helpers::getContainer('config')->get('bootstrapper::breadcrumbs_separator');
     $separator = Element::span($separator)->addClass('divider');
     // If the link is not active it's the last one, don't append separator
     if (!$active) {
         $item->nest($separator);
     } else {
         $item->addClass('active');
     }
     return $item;
 }