Tripal
Functions
tripal_bulk_loader.constants.inc File Reference

Functions

 tripal_bulk_loader_update_constant ($nid, $group_id, $table, $field, $record_id, $field_id, $value)
 
 tripal_bulk_loader_has_exposed_fields ($node)
 
 tripal_bulk_loader_set_constants_form ($form, &$form_state, $node)
 
 tripal_bulk_loader_set_constants_form_validate ($form, $form_state)
 
 tripal_bulk_loader_set_constants_form_submit ($form, $form_state)
 
 tripal_bulk_loader_edit_constant_set_form ($form, &$form_state, $node, $group_id)
 
 tripal_bulk_loader_edit_constant_set_form_submit ($form, &$form_state)
 
 tripal_bulk_loader_delete_constant_set_form ($form, &$form_state, $node, $group_id)
 
 tripal_bulk_loader_delete_constant_set_form_submit ($form, &$form_state)
 
 theme_tripal_bulk_loader_constant_set ($variables)
 

Detailed Description

Manages the constants form added to the tripal bulk loader node form

Function Documentation

◆ theme_tripal_bulk_loader_constant_set()

theme_tripal_bulk_loader_constant_set (   $variables)

Display a constant set.

Parameters
$varaiblesAn array of variables that are available: -nid: the NID of the bulk loading job node the constants are for. -constants: An array of constants as loaded by tripal_bulk_loader_load(). -template: An object containing the template record with unserialized template_array. -options: An optional array of options.
Returns
Rendered HTML.

◆ tripal_bulk_loader_delete_constant_set_form()

tripal_bulk_loader_delete_constant_set_form (   $form,
$form_state,
  $node,
  $group_id 
)

Delete a constant set (exposed fields in template)

Parameters
$form_stateThe current state of the form
$nodeThe node to set constants for
$group_idThe constant set to delete
Returns
A form array to be rendered by drupal_get_form()

◆ tripal_bulk_loader_delete_constant_set_form_submit()

tripal_bulk_loader_delete_constant_set_form_submit (   $form,
$form_state 
)

Delete the current constant set

◆ tripal_bulk_loader_edit_constant_set_form()

tripal_bulk_loader_edit_constant_set_form (   $form,
$form_state,
  $node,
  $group_id 
)

Edit a constant set (exposed fields in template)

Parameters
$form_stateThe current state of the form
$nodeThe node to set constants for
$group_idThe constant set to edit
Returns
A form array to be rendered by drupal_get_form()

◆ tripal_bulk_loader_edit_constant_set_form_submit()

tripal_bulk_loader_edit_constant_set_form_submit (   $form,
$form_state 
)

Edit constants in the current constant set

◆ tripal_bulk_loader_has_exposed_fields()

tripal_bulk_loader_has_exposed_fields (   $node)

Check if a bulk loading job has exposed constants

◆ tripal_bulk_loader_set_constants_form()

tripal_bulk_loader_set_constants_form (   $form,
$form_state,
  $node 
)

Set constants (exposed fields in template)

Parameters
$form_stateThe current state of the form
$nodeThe node to set constants for
Returns
A form array to be rendered by drupal_get_form()

◆ tripal_bulk_loader_set_constants_form_submit()

tripal_bulk_loader_set_constants_form_submit (   $form,
  $form_state 
)

Insert/update the constants associated with this node

◆ tripal_bulk_loader_set_constants_form_validate()

tripal_bulk_loader_set_constants_form_validate (   $form,
  $form_state 
)

Validate that the values entered exist in the database if indicated in hte template array

◆ tripal_bulk_loader_update_constant()

tripal_bulk_loader_update_constant (   $nid,
  $group_id,
  $table,
  $field,
  $record_id,
  $field_id,
  $value 
)

Inserts/Updates a tripal bulk loading job constant

Parameters
$nidThe node ID of the the tripal bulk loading job the constant is associated with
$tableThe chado table the constant is associated with
$fieldThe chado field the constant is associated with
$record_idThe index in the template array for this record
$field_idThe index in the template array for this field

NOTE: $template_array[$record_id]['table'] = $table and $template_array[$record_id]['fields'][$field_id]['field'] = $field both are included as a means of double-checking the constant still is still in thesame place in the template array. For example, that the template was not edited and the records moved around after the job was submitted but before it was run.

Returns
On success it returns the object (with primary key if inserted); on failure it returns FALSE