public function ServicesClientFieldFormatter::configForm in Services Client 7.2
Config form.
Overrides ServicesClientMapperPlugin::configForm
1 call to ServicesClientFieldFormatter::configForm()
- ServicesClientFieldD6Formatter::configForm in include/
mapping.inc - Config form.
1 method overrides ServicesClientFieldFormatter::configForm()
- ServicesClientFieldD6Formatter::configForm in include/
mapping.inc - Config form.
File
- include/
mapping.inc, line 745
Class
Code
public function configForm(&$form, &$form_state) {
$form['formatter_config'] = array(
'#type' => 'fieldset',
'#title' => t('Property reader'),
'#tree' => TRUE,
);
$form['formatter_config']['field'] = array(
'#type' => 'textfield',
'#title' => t('Field name'),
'#description' => t('Enter field name'),
'#default_value' => $this->config['field'],
);
$form['formatter_config']['language'] = array(
'#type' => 'textfield',
'#title' => t('Language'),
'#description' => t('Enter field name'),
'#default_value' => $this->config['language'],
);
$form['formatter_config']['property'] = array(
'#type' => 'textfield',
'#title' => t('Property name'),
'#description' => t('Enter property name'),
'#default_value' => $this->config['property'],
);
$form['formatter_config']['multivalue'] = array(
'#type' => 'select',
'#title' => t('Multiple values'),
'#description' => t('How to handle multiple values'),
'#options' => array(
'force_single' => t('Always force single value'),
'all_values' => t('Send all values available in field'),
),
'#default_value' => $this->config['multivalue'],
);
$form['formatter_config']['empty'] = array(
'#type' => 'select',
'#title' => t('Empty values'),
'#description' => t('How to handle empty values'),
'#options' => array(
'no_field' => t("Don't create any field"),
'null_field' => t("Create null field (deletes remote value)."),
'default_value' => t('Provide default value'),
),
'#default_value' => $this->config['empty'],
);
$form['formatter_config']['default_value'] = array(
'#type' => 'textfield',
'#title' => t('Default value'),
'#description' => t('Provide default value if reader will provide empty value.'),
'#default_value' => $this->config['default_value'],
'#states' => array(
'visible' => array(
':input[name="formatter_config[empty]"]' => array(
array(
'value' => 'default_value',
),
),
),
),
);
}