protected function eachProperties(array $properties, $prefix = null, $ogPrefix = true)
{
$html = [];
foreach ($properties as $property => $value) {
// multiple properties
if (is_array($value)) {
$subListPrefix = is_string($property) ? $property : $prefix;
$subList = $this->eachProperties($value, $subListPrefix);
$html[] = $subList;
} else {
if (is_string($prefix)) {
$key = is_string($property) ? $prefix . ':' . $property : $prefix;
} else {
$key = $property;
}
// if empty jump to next
if (empty($value)) {
continue;
}
$html[] = $this->makeTag($key, $value, $ogPrefix);
}
}
return implode($html);
}