function chado_retrieve_node_form_properties

2.x tripal_core.chado_nodes.properties.api.inc chado_retrieve_node_form_properties($node)

This function is used in a hook_insert, hook_update for a node form when the chado node properties form has been added to the form. It retrieves all of the properties and returns them in an array of the format:

$dbxefs[<type_id>][<rank>] = <value>

This array can then be used for inserting or updating properties

Parameters

$node:

Return value

A property array

Related topics

13 calls to chado_retrieve_node_form_properties()
chado_contact_insert in tripal_contact/includes/tripal_contact.chado_node.inc
Implements of hook_insert().
chado_contact_update in tripal_contact/includes/tripal_contact.chado_node.inc
Implements hook_update
chado_featuremap_insert in tripal_featuremap/includes/tripal_featuremap.chado_node.inc
Implements hook_insert().
chado_featuremap_update in tripal_featuremap/includes/tripal_featuremap.chado_node.inc
Implements hook_update(). Update nodes
chado_library_insert in tripal_library/includes/tripal_library.chado_node.inc
Implements hook_insert().

... See full list

1 string reference to 'chado_retrieve_node_form_properties'

File

tripal_core/api/tripal_core.chado_nodes.properties.api.inc, line 849
API to manage the chado prop table for various Tripal Node Types

Code

function chado_retrieve_node_form_properties($node) {
  $properties = array();

  if (isset($node->property_table)) {
    foreach ($node->property_table as $type_id => $elements) {
      if ($type_id != 'new' AND $type_id != 'details') {
        foreach ($elements as $property_id => $element) {
          $properties[$type_id][$element['prop_rank']] = $element['prop_value'];
        }
      }
    }
  }

  return $properties;
}