Collective\Html\HtmlBuilder::listing PHP Method

listing() protected method

Create a listing HTML element.
protected listing ( string $type, array $list, array $attributes = [] ) : Illuminate\Support\HtmlString | string
$type string
$list array
$attributes array
return Illuminate\Support\HtmlString | string
    protected function listing($type, $list, $attributes = [])
    {
        $html = '';
        if (count($list) == 0) {
            return $html;
        }
        // Essentially we will just spin through the list and build the list of the HTML
        // elements from the array. We will also handled nested lists in case that is
        // present in the array. Then we will build out the final listing elements.
        foreach ($list as $key => $value) {
            $html .= $this->listingElement($key, $type, $value);
        }
        $attributes = $this->attributes($attributes);
        return $this->toHtmlString("<{$type}{$attributes}>{$html}</{$type}>");
    }