function theme_rules_data_selector_help
Themes help for using the data selector.
1 theme call to theme_rules_data_selector_help()
- RulesDataUI::selectionForm in ui/
ui.data.inc - Provides the selection form for a parameter.
File
-
ui/
ui.theme.inc, line 185
Code
function theme_rules_data_selector_help($variables) {
$variables_info = $variables['variables'];
$param_info = $variables['parameter'];
$render = array(
'#type' => 'fieldset',
'#title' => t('Data selectors'),
'#pre_render' => array(),
'#attributes' => array(),
);
// Make it manually collapsible as we cannot use #collapsible without the
// FAPI element processor.
$render['#attached']['js'][] = 'misc/collapse.js';
$render['#attributes']['class'][] = 'collapsible';
$render['#attributes']['class'][] = 'collapsed';
$render['table'] = array(
'#theme' => 'table',
'#header' => array(
t('Selector'),
t('Label'),
t('Description'),
),
);
foreach (RulesData::matchingDataSelector($variables_info, $param_info) as $selector => $info) {
$info += array(
'label' => '',
'description' => '',
);
$render['table']['#rows'][] = array(
check_plain($selector),
check_plain(drupal_ucfirst($info['label'])),
check_plain($info['description']),
);
}
return drupal_render($render);
}