function theme_connector_buttons in Connector 7
Same name and namespace in other branches
- 6 connector.module \theme_connector_buttons()
@todo Please document this function.
See also
1 theme call to theme_connector_buttons()
- connector_button_form in ./
connector.module - Form for the connector buttons.
File
- ./
connector.module, line 561 - Connector module
Code
function theme_connector_buttons($variables) {
$form = $variables['form'];
if (!$form['#has_buttons']) {
return NULL;
}
$output = '';
$buttons = array();
foreach (element_children($form) as $key) {
if ($form[$key]['#type'] == 'submit') {
$class = str_replace('_', '-', $key);
$form[$key]['#attributes']['class'][] = 'connector-button';
$form[$key]['#attributes']['class'][] = $class;
$form[$key]['#prefix'] = '<span class="connector-button-wrapper ' . $class . '">';
$form[$key]['#suffix'] = '</span>';
}
}
return drupal_render_children($form);
}