Tripal
|
Functions | |
tripal_pub_node_info () | |
chado_pub_form ($node, $form_state) | |
chado_pub_validate ($node, $form, &$form_state) | |
chado_pub_validate_check_uniquename ($uniquename, $pub_id=NULL) | |
chado_pub_validate_check_duplicate ($title, $pyear, $series_name, $cvterm, $pub_id=NULL) | |
tripal_pub_node_access ($node, $op, $account) | |
chado_pub_insert ($node) | |
chado_pub_update ($node) | |
chado_pub_load ($nodes) | |
chado_pub_delete (&$node) | |
tripal_pub_node_view ($node, $view_mode, $langcode) | |
tripal_pub_node_insert ($node) | |
tripal_pub_node_load ($nodes, $types) | |
tripal_pub_node_update ($node) | |
tripal_pub_node_presave ($node) | |
chado_pub_chado_node_default_title_format () | |
chado_pub_chado_node_sync_select_query ($query) | |
Implements Drupal Node hooks to create the chado_analysis node content type.
chado_pub_chado_node_default_title_format | ( | ) |
Implements [content_type]_chado_node_default_title_format().
Defines a default title format for the Chado Node API to set the titles on Chado pub nodes based on chado fields.
chado_pub_chado_node_sync_select_query | ( | $query | ) |
Implements [content_type]_chado_node_sync_select_query().
Adds a where clause to the query to exclude the NULL pub.
chado_pub_delete | ( | & | $node | ) |
Implements hook_delete().
This function takes a node and if the delete button has been chosen by the user, the publication and it's details will be removed.Following,given the node-ID, the instance will be deleted from the 'chado_pub' table.
@parm $node Then node to be deleted
chado_pub_form | ( | $node, | |
$form_state | |||
) |
Implements hook_form().
chado_pub_insert | ( | $node | ) |
Implements hook_insert().
chado_pub_load | ( | $nodes | ) |
Implements hook_load().
$node | The node that is to be loaded |
chado_pub_update | ( | $node | ) |
Implements hook_update().
The purpose of the function is to allow the module to take action when an edited node is being updated. It updates any name changes to the database tables that werec reated upon registering a Publication. As well, the database will be changed, so the user changed information will be saved to the database.
$node | The node being updated |
chado_pub_validate | ( | $node, | |
$form, | |||
& | $form_state | ||
) |
Implements hook_validate().
chado_pub_validate_check_duplicate | ( | $title, | |
$pyear, | |||
$series_name, | |||
$cvterm, | |||
$pub_id = NULL |
|||
) |
Check for duplicate publications. To be called from hook_validate(). Sets the form error if a duplicate
$title | The title of the publication |
$pyear | The year the publication was published |
$series_name | The series name of the publication |
$cvterm | The type of publication |
$pub_id | the unique id of the publication |
chado_pub_validate_check_uniquename | ( | $uniquename, | |
$pub_id = NULL |
|||
) |
Validate the publication uniquename. To be called from hook_validate().
$uniquename | The uniquename of the publication |
$pub_id | If an update, provide the pub_id so we don't check for a matching uniquename of the pub we are editing |
tripal_pub_node_access | ( | $node, | |
$op, | |||
$account | |||
) |
Implement hook_node_access().
This hook allows node modules to limit access to the node types they define.
$node | The node on which the operation is to be performed, or, if it does not yet exist, the type of node to be created |
$op | The operation to be performed |
$account | A user object representing the user for whom the operation is to be performed |
tripal_pub_node_info | ( | ) |
Implements hook_node_info().
Provide information to drupal about the node types that we're creating in this module
tripal_pub_node_insert | ( | $node | ) |
Implements hook_node_insert(). Acts on all content types.
We want the publications to always have a URL of http://[base url]/pub/[pub id] where [pub id] is the Chado publication ID. This will allow for easy linking into the publication without needing to know the node. Of course if you know the node that will still work too (e.g. http://[base url]/node/[node id] so the nodeapi function ensures that the URL path is set after insert or update of the node and when the node is loaded if it hasn't yet been set.
tripal_pub_node_load | ( | $nodes, | |
$types | |||
) |
Implements hook_node_load(). Acts on all content types.
We want the publications to always have a URL of http://[base url]/pub/[pub id] where [pub id] is the Chado publication ID. This will allow for easy linking into the publication without needing to know the node. Of course if you know the node that will still work too (e.g. http://[base url]/node/[node id] so the nodeapi function ensures that the URL path is set after insert or update of the node and when the node is loaded if it hasn't yet been set.
tripal_pub_node_presave | ( | $node | ) |
Implements hook_node_presave(). Acts on all content types.
tripal_pub_node_update | ( | $node | ) |
Implements hook_node_update(). Acts on all content types.
We want the publications to always have a URL of http://[base url]/pub/[pub id] where [pub id] is the Chado publication ID. This will allow for easy linking into the publication without needing to know the node. Of course if you know the node that will still work too (e.g. http://[base url]/node/[node id] so the nodeapi function ensures that the URL path is set after insert or update of the node and when the node is loaded if it hasn't yet been set.
tripal_pub_node_view | ( | $node, | |
$view_mode, | |||
$langcode | |||
) |
Implements hook_node_view(). Acts on all content types.