Tripal
Functions
tripal_contact.chado_node.inc File Reference

Functions

 tripal_contact_node_info ()
 
 chado_contact_form (&$node, $form_state)
 
 chado_contact_validate ($node, $form, &$form_state)
 
 tripal_contact_node_access ($node, $op, $account)
 
 chado_contact_insert ($node)
 
 chado_contact_update ($node)
 
 chado_contact_load ($nodes)
 
 chado_contact_delete (&$node)
 
 tripal_contact_node_view ($node, $view_mode, $langcode)
 
 tripal_contact_node_presave ($node)
 
 tripal_contact_node_insert ($node)
 
 tripal_contact_node_update ($node)
 
 chado_contact_chado_node_default_title_format ()
 
 chado_contact_chado_node_default_url_format ()
 
 chado_contact_chado_node_sync_select_query ($query)
 

Detailed Description

Implements drupal node hooks.

Function Documentation

◆ chado_contact_chado_node_default_title_format()

chado_contact_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 contact nodes based on chado fields.

◆ chado_contact_chado_node_default_url_format()

chado_contact_chado_node_default_url_format ( )

Implements hook_chado_node_default_url_format().

Designates a default URL format for contact nodes.

◆ chado_contact_chado_node_sync_select_query()

chado_contact_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 contact.

◆ chado_contact_delete()

chado_contact_delete ( $node)

Implements hook_delete().

This function takes a node and if the delete button has been chosen by the user, the contact and it's details will be removed.Following,given the node-ID, the instance will be deleted from the 'chado_contact' table.

@parm $node Then node which contains the information stored within the node-ID

◆ chado_contact_form()

chado_contact_form ( $node,
  $form_state 
)

Implementation of hook_form().

@parm $node The node that is created when the database is initialized

@parm $form_state The state of the form, that has the user entered information that is neccessary for, setting up the database tables for the contact

Returns
$form The information that was enterd allong with

◆ chado_contact_insert()

chado_contact_insert (   $node)

Implements of hook_insert().

This function inserts user entered information pertaining to the contact instance into the 'contactauthor', 'contactprop', 'chado_contact', 'contact' talble of the database.

@parm $node Then node which contains the information stored within the node-ID

◆ chado_contact_load()

chado_contact_load (   $nodes)

Implements hook_load().

Parameters
$nodeThe node that is to be accessed from the database
Returns
$node The node with the information to be loaded into the database

◆ chado_contact_update()

chado_contact_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 were created upon registering a contact. As well, the database will be changed, so the user changed information will be saved to the database.

Parameters
$nodeThe node being updated

◆ chado_contact_validate()

chado_contact_validate (   $node,
  $form,
$form_state 
)

Implements hook_validate(). Validates submission of form when adding or updating a contact node.

◆ tripal_contact_node_access()

tripal_contact_node_access (   $node,
  $op,
  $account 
)

Implements hook_access().

This hook allows node modules to limit access to the node types they define.

Parameters
$nodeThe node on which the operation is to be performed, or, if it does not yet exist, the type of node to be created
$opThe operation to be performed
$accountA user object representing the user for whom the operation is to be performed
Returns
If the permission for the specified operation is not set then return FALSE. If the permission is set then return NULL as this allows other modules to disable access. The only exception is when the $op == 'create'. We will always return TRUE if the permission is set.

◆ tripal_contact_node_info()

tripal_contact_node_info ( )

Implementation of hook_node_info(). This node_info, is a simple node that describes the functionallity of the module.

◆ tripal_contact_node_insert()

tripal_contact_node_insert (   $node)

Implements hook_node_insert(). Acts on all content types.

◆ tripal_contact_node_presave()

tripal_contact_node_presave (   $node)

Implements hook_node_presave().

◆ tripal_contact_node_update()

tripal_contact_node_update (   $node)

Implements hook_node_update(). Acts on all content types.

◆ tripal_contact_node_view()

tripal_contact_node_view (   $node,
  $view_mode,
  $langcode 
)

Implements hook_node_view().