function views_data_export_plugin_display_export::options_form in Views data export 6.3
Same name and namespace in other branches
- 6 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::options_form()
- 6.2 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::options_form()
- 7.4 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::options_form()
- 7 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::options_form()
- 7.3 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::options_form()
Provide the default form for setting options.
File
- plugins/
views_data_export_plugin_display_export.inc, line 96 - Contains the bulk export display plugin.
Class
- views_data_export_plugin_display_export
- The plugin that batches its rendering.
Code
function options_form(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_form($form, $form_state);
switch ($form_state['section']) {
case 'use_batch':
$form['#title'] .= t('Batched export');
$form['use_batch'] = array(
'#type' => 'radios',
'#description' => t(''),
'#default_value' => $this
->get_option('use_batch'),
'#options' => array(
TRUE => t('Export data in small segments to build a complete export. Recommended for large exports sets (1000+ rows)'),
FALSE => t('Export data all in one segment. Possible time and memory limit issues.'),
),
);
if (!$this
->is_compatible()) {
$form['use_batch']['#disabled'] = TRUE;
$form['use_batch']['#default_value'] = 0;
$form['use_batch']['message'] = array(
'#type' => 'markup',
'#value' => theme('views_data_export_message', t('The underlying database (!db_driver) is incompatible with the batched export option and it has been disabled.', array(
'!db_driver' => $this
->_get_database_driver(),
))),
'#weight' => -10,
);
}
break;
}
}