You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tripal/Chado Fields are automatically attached to content types using our Tripal Fields Collection service. This service uses a YAML file describing the field settings and content type mapping which should be named yourmodule/config/install/tripal.tripalfield_collection.yourmodule.yml. And example of this file and the one which defines the default fields for chado can be found here: tripal_chado/config/install/tripal.tripalfield_collection.default_chado.yml.
The beginning of the file should look like:
id: 'default_chado'
label: 'Default Chado Fields'
description: 'Default fields configurations provided by the Tripal Chado module'
fields:
Where you replace strings with ones which match your module and intent.
Then below fields: each item is an individual field and described the entity it is attached to and it's settings. For example, the following stanza describes the organism field attached to the gene content type:
- name: gene_organismcontent_type: genelabel: Organismtype: chado_organism_defaultdescription: A material entity that is an individual living system, such as animal, plant, bacteria or virus, that is capable of replicating or reproducing, growth and maintenance in the right environment. An organism may be unicellular or made up, like humans, of many billions of cells divided into specialized tissues and organs.cardinality: 1required: truestorage_settings:
storage_plugin_id: chado_storagestorage_plugin_settings:
base_table: featurebase_column: organism_idsettings:
termIdSpace: OBItermAccession: "0100026"display:
view:
default:
region: contentlabel: aboveweight: 10form:
default:
region: contentweight: 10
The name should be a unique name for this field instance (i.e. must uniquely identify this field attached to the gene) which is why it usually consists of the content type name followed by the field name.
The label will be a Human readable string shown to the administrator in the UI. It is also often the field label so be descriptive but also short.
The type should be the id in your fieldtype class annotation.
The storage_settings indicate where your field should store it's data in chado. This is specifically the main store_id and will be further expanded by your properties in the field type addTypes() method.
The display section idicates where in the view or edit form this field should be displayed by default. If this is not set propertly your field will likely be disabled by default which can be confusing!
The text was updated successfully, but these errors were encountered:
Tripal/Chado Fields are automatically attached to content types using our Tripal Fields Collection service. This service uses a YAML file describing the field settings and content type mapping which should be named
yourmodule/config/install/tripal.tripalfield_collection.yourmodule.yml
. And example of this file and the one which defines the default fields for chado can be found here: tripal_chado/config/install/tripal.tripalfield_collection.default_chado.yml.The beginning of the file should look like:
Where you replace strings with ones which match your module and intent.
Then below
fields:
each item is an individual field and described the entity it is attached to and it's settings. For example, the following stanza describes the organism field attached to the gene content type:The name should be a unique name for this field instance (i.e. must uniquely identify this field attached to the gene) which is why it usually consists of the content type name followed by the field name.
The content_type value must match the machine name of a content type existing on the site. Examples of the default tripal content types can be found here: https://github.com/tripal/tripal/blob/4.x/tripal_chado/config/install/tripal.tripalentitytype_collection.default_chado.yml
The label will be a Human readable string shown to the administrator in the UI. It is also often the field label so be descriptive but also short.
The type should be the
id
in your fieldtype class annotation.The storage_settings indicate where your field should store it's data in chado. This is specifically the main store_id and will be further expanded by your properties in the field type addTypes() method.
The display section idicates where in the view or edit form this field should be displayed by default. If this is not set propertly your field will likely be disabled by default which can be confusing!
The text was updated successfully, but these errors were encountered: