function wsdata_language_plugin_path_form in Web Service Data 7
Path language plugin form
2 string references to 'wsdata_language_plugin_path_form'
- hook_wsdata_language_plugin in ./
wsdata.api.php - List of language handler plugins
- wsdata_wsdata_language_plugin in ./
wsdata.module - Implements hook_wsdata_language_plugin().
File
- ./
wsdata.admin.inc, line 87 - Administrator forms for wsdata
Code
function wsdata_language_plugin_path_form($settings = array()) {
$form['position'] = array(
'#type' => 'textfield',
'#title' => t('Position'),
'#description' => t('Position within the path to insert the language value.'),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => isset($settings['position']) ? $settings['position'] : 0,
'#element_validate' => array(
'element_validate_integer',
),
);
$languages = language_list();
foreach ($languages as $language) {
$form[$language->language] = array(
'#type' => 'textfield',
'#title' => $language->native,
'#description' => t('Value to use when requesting @lang values.', array(
'@lang' => $language->native,
)),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => isset($settings[$language->language]) ? $settings[$language->language] : $language->language,
);
}
return $form;
}