function panels_common_add_item_table in Panels 6.2
Same name and namespace in other branches
- 5.2 includes/common.inc \panels_common_add_item_table()
Add the context table to the page.
4 calls to panels_common_add_item_table()
- panels_common_add_argument_form in includes/
common-context.inc - Add the argument table plus gadget plus javascript to the form.
- panels_common_add_context_form in includes/
common-context.inc - panels_common_add_relationship_form in includes/
common-context.inc - panels_common_add_required_context_form in includes/
common-context.inc
File
- includes/
common-context.inc, line 194 - includes/common-context.inc Provide API for adding contexts for modules that embed displays.
Code
function panels_common_add_item_table($type, &$form, $available_contexts, $items) {
$form[$type] = array(
'#tree' => TRUE,
);
$module = $form['#panels_context_module'];
$name = $form['#panel_name'];
if (isset($items) && is_array($items)) {
foreach ($items as $position => $context) {
panels_common_add_item_to_form($module, $type, $name, $form[$type][$position], $position, $context);
}
}
$type_info = panels_common_context_info($type);
$form['description'] = array(
'#prefix' => '<div class="description">',
'#suffix' => '</div>',
'#value' => $type_info['description'],
);
panels_common_add_item_table_buttons($type, $module, $form, $available_contexts);
}