Tripal Entities
Provides an application programming interface (API) for working with TripalEntity content types (bundles) and their entities.
Bundles (Content Types): Bundles are types of content in a Drupal site. By default, Drupal provides the Basic Page and Article content types, and Drupal allows a site developer to create new content types on-the-fly using the administrative interface--no programming required. Tripal also provides several Content Type by default. During installation of Tripal the Organism, Gene, Project, Analysis and other content types are created automatically. The site developer can then create new content types for different biological data--again, without any programming required.
In order to to assist with data exchange and use of common data formats, Tripal Bundles are defined using a controlled vocabulary term (cvterm). For example, a "Gene" Bundle is defined using the Sequence Ontology term for gene whose term accession is: SO:0000704. This mapping allows Tripal to compare content across Tripal sites, and expose data to computational tools that understand these vocabularies. By default, Tripal uses Chado as its primary data storage back-end.
Entity: An entity is a discrete data record. Entities are most commonly seen as "pages" on a Drupal web site and are instances of a Bundle (i.e content type). When data is published on a Tripal site such as organisms, genes, germplasm, maps, etc., each record is represented by a single entity with an entity ID as its only attribute. All other information that the entity provides is made available via Fields.
For more information please see: http://tripal.info/tutorials/v3.x/developers-handbook/structure
Parent topics
File
- tripal/
api/ tripal.entities.api.inc, line 10 - Provides an application programming interface (API) for working with TripalEntity content types (bundles) and their entities.
Functions
Name | Location | Description |
---|---|---|
hook_bundle_create |
tripal/ |
Allows a module to perform tasks after a TripalBundle object is created. |
hook_bundle_delete |
tripal/ |
Allows a module to perform tasks before a TripalBundle object is deleted. |
hook_bundle_postcreate |
tripal/ |
Allows a module to perform tasks after fields are added to a TripalBundle. |
hook_entity_create |
tripal/ |
Allows a module to make changes to an entity object after creation. |
hook_tripal_cron_notification |
tripal/ |
Allows a module to add admin notifications to the associated tripal table during the cron run. |
hook_tripal_default_title_format |
tripal/ |
Implement this hook to define default formats for Tripal Content Types. |
theme_token_list |
tripal/ |
Formats the tokens for display. |
tripal_add_notification |
tripal/ |
Allows a module to write to the admin notification table during the cron run. |
tripal_create_bundle |
tripal/ |
Creates a new Tripal Entity type (i.e. bundle). |
tripal_create_bundle_fields |
tripal/ |
Refreshes the bundle such that new fields added by modules will be found. |
tripal_entity_label |
tripal/ |
Define the entity label callback. This will return the title. |
tripal_get_bundle_details |
tripal/ |
Retrieves details, including attached fields, for a given bundle. |
tripal_get_bundle_variable |
tripal/ |
Fetch the value for a given tripal variable. |
tripal_get_content_type |
tripal/ |
Retrieves information about a given content type. |
tripal_get_content_types |
tripal/ |
Retrieves a list of the content types. |
tripal_get_default_title_format |
tripal/ |
Determine the default title format to use for an entity. |
tripal_get_entity_tokens |
tripal/ |
Returns an array of tokens based on Tripal Entity Fields. |
tripal_get_title_format |
tripal/ |
Get Page Title Format for a given Tripal Entity Type. |
tripal_load_bundle_entity |
tripal/ |
Retrieves a TripalBundle entity that matches the given arguments. |
tripal_load_entity |
tripal/ |
A replacement for the entity_load function of Drupal. |
tripal_load_term_entity |
tripal/ |
Retrieves a TripalTerm entity that matches the given arguments. |
tripal_load_vocab_entity |
tripal/ |
Retrieves a TripalVocab entity that maches the given arguments. |
tripal_replace_entity_tokens |
tripal/ |
Replace all Tripal Tokens in a given string. |
tripal_save_title_format |
tripal/ |
Save Page Title Format for a given Tripal Entity Type. |
tripal_set_bundle_variable |
tripal/ |
Save the value of a tripal variable for a given bundle. |
tripal_tripal_cron_notification |
tripal/ |
Refreshes the bundle such that new fields added by modules will be found during cron. |
tripal_update_bundle_field |
tripal/ |
Updates an existing field and its attached instance to a bundle. |
_tripal_get_bundle_field_element_details |
tripal/ |
A recursive helper function for the tripal_get_bundle_details. |