function quicktabs_export_form in Quick Tabs 7.2
Same name and namespace in other branches
- 6.3 includes/admin.inc \quicktabs_export_form()
- 7.3 quicktabs.admin.inc \quicktabs_export_form()
Export form for quicktabs.
1 string reference to 'quicktabs_export_form'
- quicktabs_menu in ./
quicktabs.module - Implements hook_menu().
File
- includes/
admin.inc, line 603 - Provides the Quick Tabs' administrative interface.
Code
function quicktabs_export_form(&$form_state, $quicktab) {
ctools_include('export');
// Generate export code
$code = '$items = array();' . "\n";
$code .= ctools_export_object('quicktabs', $quicktab, '');
$code .= '$items["' . $quicktab->machine_name . '"] = $quicktab;' . "\n";
$code .= 'return $items;';
// Create form
$form = array();
$form['export'] = array(
'#type' => 'textarea',
'#default_value' => $code,
'#rows' => substr_count($code, "\n") + 1,
'#resizable' => FALSE,
'#description' => t('Place this code in your module\'s implementation of <code>hook_quicktabs_default_quicktabs()</code> to provide it as a default quicktab.'),
);
$form['done'] = array(
'#type' => 'submit',
'#value' => t('Done'),
);
$form['#redirect'] = 'admin/structure/quicktabs';
return $form;
}