function taxonomy_xml_create_guid_field in Taxonomy import/export via XML 7
Create a URI field that will be applied to our vocabularies.
So we can identify their terms.
Uses field API CRUD
1 call to taxonomy_xml_create_guid_field()
- taxonomy_xml_prepare_vocabulary in ./
taxonomy_xml.process.inc - Ensure a vocab will store our URI and extra values.
File
- ./
taxonomy_xml.process.inc, line 88 - The workhorse processes for importing taxonomies.
Code
function taxonomy_xml_create_guid_field() {
$field = array(
'field_name' => 'field_guid',
'type' => 'text',
'entity_type' => 'taxonomy_term',
'module' => 'text',
'cardinality' => 1,
'translatable' => TRUE,
'locked' => TRUE,
'indexes' => array(
'format' => array(
'format',
),
),
'settings' => array(
'max_length' => 255,
),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
),
);
return field_create_field($field);
}