Noherczeg\Breadcrumb\Builders\BootstrapBuilder::build PHP Method

build() public method

WARNING! Bootsrap won't accept any properties submitted to it, since it's not in the model by default! Parameter is only there as placeholder!
public build ( String | null $casing = null, boolean $last_not_link = true, String | null $separator = null, array $properties = [], boolean $different_links = false ) : String
$casing String | null Casing option
$last_not_link boolean True if last shouldn't be a link
$separator String | null Separator String
$properties array
$different_links boolean Each segment is appended to base_url instead of the previous segment
return String
    public function build($casing = null, $last_not_link = true, $separator = null, $properties = array(), $different_links = false)
    {
        // always create link on build stage!
        $this->link($last_not_link, $different_links);
        // handle defaults
        $this->separator = is_null($separator) ? $this->config->value('separator') : $separator;
        $this->casing = is_null($casing) ? $this->config->value('casing') : $casing;
        $result = '<ul class="breadcrumb">';
        foreach ($this->segments as $key => $segment) {
            $result .= $this->appendElement($key, $segment, $properties);
        }
        return $result . '</ul>';
    }