public function insertBreadcrumbs(array $values)
    {
        if (empty($values)) {
            return;
        }

        if ($this->Breadcrumbs instanceof XMLElement && count($this->Breadcrumbs->getChildrenByName('nav')) === 1) {
            $nav = $this->Breadcrumbs->getChildrenByName('nav');
            $nav = $nav[0];

            $p = $nav->getChild(0);
        } else {
            $p = new XMLElement('p');
            $nav = new XMLElement('nav');
            $nav->appendChild($p);

            $this->Breadcrumbs->prependChild($nav);
        }

        foreach ($values as $v) {
            $p->appendChild($v);
            $p->appendChild(new XMLElement('span', '&#8250;', array('class' => 'sep')));
        }
    }
public function insertBreadcrumbs(array $values)
    {
        if (empty($values)) {
            return;
        }

        if ($this->Breadcrumbs instanceof XMLElement && count($this->Breadcrumbs->getChildrenByName('nav')) === 1) {
            $nav = $this->Breadcrumbs->getChildrenByName('nav');
            $nav = $nav[0];

            $p = $nav->getChild(0);
        } else {
            $p = new XMLElement('p');
            $nav = new XMLElement('nav');
            $nav->appendChild($p);

            $this->Breadcrumbs->prependChild($nav);
        }

        foreach ($values as $v) {
            $p->appendChild($v);
            $p->appendChild(new XMLElement('span', '&#8250;', array('class' => 'sep')));
        }
    }
public function insertBreadcrumbs ( array $ values ) { if ( empty ( $ values ) ) { return ; } if ( $ this -> Breadcrumbs instanceof XMLElement && count ( $ this -> Breadcrumbs -> getChildrenByName ( 'nav' ) ) === 1 ) { $ nav = $ this -> Breadcrumbs -> getChildrenByName ( 'nav' ) ; $ nav = $ nav [ 0 ] ; $ p = $ nav -> getChild ( 0 ) ; } else { $ p = new XMLElement ( 'p' ) ; $ nav = new XMLElement ( 'nav' ) ; $ nav -> appendChild ( $ p ) ; $ this -> Breadcrumbs -> prependChild ( $ nav ) ; } foreach ( $ values as $ v ) { $ p -> appendChild ( $ v ) ; $ p -> appendChild ( new XMLElement ( 'span' , '&#8250;' , array ( 'class' => 'sep' ) ) ) ; } }
Allows developers to specify a list of nav items that build the
path to the current page or, in jargon, "breadcrumbs".

@since Symphony 2.3
@param array $values
An array of `XMLElement`'s or strings that compose the path. If breadcrumbs
already exist, any new item will be appended to the rightmost part of the
path.
Allows developers to specify a list of nav items that build the path to the current page or in jargon breadcrumbs .