function views_plugin_style_xml_test::options_form in Views Datasource 6
Same name and namespace in other branches
- 7 views/plugins/views_plugin_style_xml_test.inc \views_plugin_style_xml_test::options_form()
Provide a form for setting options.
_state
Parameters
$form:
File
- ./
views_plugin_style_xml_test.inc, line 31 - Implementation of views_plugin_style for views_xml
Class
- views_plugin_style_xml_test
- Implementation of views_plugin_style
Code
function options_form(&$form, &$form_state) {
$form['schema'] = array(
'#type' => 'radios',
'#title' => t('XML schema'),
'#description' => t('The schema or format of the XML data document.'),
'#options' => array(
'raw' => t('Raw XML'),
'opml' => t('OPML'),
'atom' => t('Atom'),
),
'#default_value' => $this->options['schema'],
);
$form['root_element'] = array(
'#type' => 'textfield',
'#title' => t('Root element name'),
'#default_value' => $this->options['root_element'],
'#description' => t('The name of the root element in the XML document.'),
);
$form['field_output'] = array(
'#type' => 'radios',
'#title' => 'Field output',
'#description' => 'For each row in the view, fields can be output as either the field rendered by Views, or by the raw content of the field.',
'#options' => array(
'normal' => t('Normal'),
'raw' => t('Raw'),
),
'#default_value' => $this->options['field_output'],
);
$form['element_output'] = array(
'#type' => 'radios',
'#title' => 'Element output',
'#description' => 'For each row in the view, fields can be output as either nested XML child elements, or attributes of the XML element.',
'#options' => array(
'nested' => t('Nested'),
'attributes' => t('Attributes'),
),
'#default_value' => $this->options['element_output'],
);
$form['escape_as_CDATA'] = array(
'#type' => 'radios',
'#title' => 'Escape row content as CDATA',
'#description' => 'For each row in the view, escape the row field content as XML CDATA sections.',
'#options' => array(
'yes' => t('Yes'),
'no' => t('No'),
),
'#default_value' => $this->options['escape_as_CDATA'],
);
}