function theme_connector_buttons in Connector 6
Same name and namespace in other branches
- 7 connector.module \theme_connector_buttons()
1 theme call to theme_connector_buttons()
File
- ./
connector.module, line 647 - Connector module
Code
function theme_connector_buttons($form) {
$output = '';
$buttons = array();
foreach ($form as $key => $value) {
if (drupal_substr($key, 0, 1) != '#') {
$buttons[$key] = $value;
}
}
$num_links = count($buttons);
$i = 1;
foreach ($buttons as $key => $value) {
$class = 'connector-' . str_replace('_', '-', $key);
if ($i == 1) {
$class .= ' first';
}
if ($i == $num_links) {
$class .= ' last';
}
$output .= '<li' . drupal_attributes(array(
'class' => $class,
)) . '>';
$output .= drupal_render($value);
$output .= '</li>';
$i += 1;
}
return '<ul class="connector-buttons">' . $output . '</ul>';
}