Esempio n. 1
0
 /** @test */
 public function it_can_render_the_view()
 {
     $breadcrumb = new Breadcrumb($this->viewFactory);
     $breadcrumb->add('Home');
     $view = $breadcrumb->render();
     $this->assertInstanceOf('Illuminate\\View\\View', $view);
 }
Esempio n. 2
0
function osc_breadcrumb($separator = '»', $echo = true, $lang = array())
{
    $br = new Breadcrumb($lang);
    $br->init();
    if ($echo) {
        echo $br->render($separator);
        return;
    }
    return $br->render($separator);
}
 /**
  * breadcrumb
  *
  * @since 2.3.0
  *
  * @return string
  */
 public static function breadcrumb()
 {
     $breadcrumb = new Breadcrumb(Registry::getInstance(), Language::getInstance());
     $breadcrumb->init(array('className' => array('list' => 'list_breadcrumb', 'divider' => 'divider')));
     return $breadcrumb->render();
 }
Esempio n. 4
0
 /**
  * @return string
  */
 public function render()
 {
     return $this->_breadcrumb->render();
 }
Esempio n. 5
0
<?php

event('parse', $item);
if ($item->show_breadcrumb) {
    $elements = array();
    if ($parents = $item->getParents()) {
        foreach ($parents as $parent) {
            $elements[] = array('label' => $parent->name, 'link' => $parent->getLink());
        }
    }
    $elements[] = array('label' => $item->name, 'link' => $item->getLink());
    $bc = new Breadcrumb(array('name' => 'page', 'render' => FALSE, 'multiple' => TRUE, 'elements' => $elements));
    echo $bc->render();
} else {
    if ($item->show_title) {
        title($item->name);
    }
}
event('Page.before', $item);
?>
<article class="page shd posrel">
<?php 
if (access('Pages.admin')) {
    ?>
        <a class="sh posabs topright" href="<?php 
    echo $item->getLink('edit');
    ?>
"><?php 
    echo icon('pencil');
    ?>
</a>