$bundle->term_id)); $vocab = $term->vocab; $params = array( 'vocabulary' => $vocab->vocabulary, 'accession' => $term->accession, ); // We allow site admins to add new chado_linker__prop fields to an entity. // This function will allow us to properly add them. But at this point we // don't know the controlled vocabulary term. We'll have to use the // defaults and let the user set it using the interface. if ($new_field['type'] == 'remote__data') { $field_name = $new_field['field_name']; $field_type = 'remote__data'; // First add the field. field_create_field(array( 'field_name' => $field_name, 'type' => $field_type, 'cardinality' => FIELD_CARDINALITY_UNLIMITED, 'locked' => FALSE, 'storage' => array( 'type' => 'field_tripal_ws_storage', ), )); // Now add the instance field_create_instance(array( 'field_name' => $field_name, 'entity_type' => 'TripalEntity', 'bundle' => $bundle->name, 'label' => $new_field['label'], 'description' => '', 'required' => FALSE, 'settings' => array( 'auto_attach' => FALSE, 'term_vocabulary' => '', 'term_accession' => '', 'term_name' => '' ), 'widget' => array( 'type' => 'remote__data_widget', 'settings' => array( 'display_label' => 1, ), ), 'display' => array( 'default' => array( 'label' => 'inline', 'type' => 'remote__data_formatter', 'settings' => array(), ), ), )); } }