For example, if I’m building a list in a plugin that loops over an array to produce a list ul
or ol
. I typically see code as follows.
foreach($list as $item) {
$output .= '<li>' . $item['value'] . '</li>';
}
I guess I’m looking to see if there is a comparable to such functions in the Drupal world such as theme_list()
(reference). I’m looking to give my list of items to a function and have it write the HTML block in a standardized way.