function mymodule_search_field_author_default_field_instances_template in Features Items Template 7
Example of template callback.
Return the field instance defination like would recieve from exporting via features, including being keyed. Suggestion is to create a field then export the field base and field instance to a feature. Remove the field instance into .module and rename it to your 'template' function.
1 string reference to 'mymodule_search_field_author_default_field_instances_template'
- hook_features_template_info in ./
features_template.api.php - RETURN an array of datum array that tell features template how and what items to make. they each have the following properties plugin: what features template template plugin to use template: where is the template that should be used to construct…
File
- ./
features_template.api.php, line 42 - API info for features template module
Code
function mymodule_search_field_author_default_field_instances_template() {
return array(
'field_author' => array(
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 5,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_author',
'label' => 'Author',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'node_reference',
'settings' => array(
'autocomplete_match' => 'contains',
'autocomplete_path' => 'node_reference/autocomplete',
'references_dialog_add' => 1,
'references_dialog_edit' => 1,
'references_dialog_search' => 1,
'references_dialog_search_view' => '',
'size' => 60,
),
'type' => 'node_reference_autocomplete',
'weight' => 2,
),
),
);
}