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}>");
}