function theme_path_breadcrumbs_ui_form_step_arguments_selection_table in Path Breadcrumbs 7.2
Same name and namespace in other branches
- 7.3 path_breadcrumbs_ui/path_breadcrumbs_ui.theme.inc \theme_path_breadcrumbs_ui_form_step_arguments_selection_table()
Theme the table for argument settings form.
1 theme call to theme_path_breadcrumbs_ui_form_step_arguments_selection_table()
- _path_breadcrumbs_ui_form_step_arguments_selection in path_breadcrumbs_ui/
path_breadcrumbs_ui.module - SECOND STEP. Provide form for arguments selection.
File
- path_breadcrumbs_ui/
path_breadcrumbs_ui.theme.inc, line 103
Code
function theme_path_breadcrumbs_ui_form_step_arguments_selection_table($vars) {
$header = array(
array(
'data' => t('Argument'),
),
array(
'data' => t('Position in path'),
),
array(
'data' => t('Context assigned'),
),
array(
'data' => t('Operations'),
),
);
$form = $vars['form'];
ctools_include('modal');
ctools_modal_add_js();
$rows = array();
foreach (element_children($form['argument']) as $key) {
$row = array();
$row[] = check_plain($form['argument'][$key]['#keyword']);
$row[] = check_plain($form['argument'][$key]['#position']);
$row[] = $form['argument'][$key]['#context'] . ' ' . drupal_render($form['argument'][$key]['change']);
$row[] = drupal_render($form['argument'][$key]['settings']) . drupal_render($form['argument'][$key]);
$rows[] = array(
'data' => $row,
);
}
if (!$rows) {
$rows[] = array(
array(
'data' => t('The path %path has no arguments to configure.', array(
'%path' => $form['#breadcrumbs-path'],
)),
'colspan' => 4,
),
);
}
return theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'id' => 'path-breadcrumbs-ui-argument-table',
),
));
}