function lookup_taxonomy_service_form in Taxonomy import/export via XML 7
A sub-form that provides UI additions to the taxonomy import form
1 string reference to 'lookup_taxonomy_service_form'
- lookup_taxonomy_service_info in services/
lookup.taxonomy_service.inc - hook_taxonomy_service_info()
File
- services/
lookup.taxonomy_service.inc, line 31 - declare how to import a taxonomy from file upload.
Code
function lookup_taxonomy_service_form() {
$available_services = lookup_taxonomy_service_services();
$options = array();
foreach ($available_services as $id => $service) {
$options[$id] = $service['provider'] . " - " . $service['name'];
}
$formats = taxonomy_xml_formats();
$form = array(
'#type' => 'fieldset',
'#attributes' => array(
'id' => 'edit-service-wrapper',
),
'service_id' => array(
'#type' => 'select',
'#title' => t('Taxonomy Server'),
'#description' => t('
Choose one of the available taxonomy server services.
These preset services are defined in the taxonomy_xml module
and may be extended by other contributed modules.
'),
'#default_value' => variable_get('taxonomy_xml_service_id', ''),
'#options' => $options,
),
'identifier' => array(
'#type' => 'textfield',
'#title' => t('Unique Identifier for this service'),
'#description' => t('Optional ID, GIUD, LSID, URI or other UID as (if) required by this service.'),
'#default_value' => variable_get('taxonomy_xml_identifier', ''),
),
'information' => array(
'#type' => 'markup',
'#value' => l('More info about remote taxonomy services', TAXONOMY_XML_ADMIN . '/import/services'),
),
);
$form['format'] = array(
'#type' => 'select',
'#title' => t('Format of file'),
'#default_value' => variable_get('taxonomy_xml_format', 'xml_format'),
'#options' => $formats,
);
return $form;
}