Tripal
Functions
tripal_organism.chado_node.inc File Reference

Functions

 tripal_organism_node_info ()
 
 tripal_organism_node_access ($node, $op, $account)
 
 chado_organism_form ($node, $form_state)
 
 chado_organism_validate ($node, $form, &$form_state)
 
 chado_organism_insert ($node)
 
 chado_organism_update ($node)
 
 chado_organism_add_image ($node)
 
 chado_organism_delete ($node)
 
 chado_organism_load ($nodes)
 
 tripal_organism_node_presave ($node)
 
 tripal_organism_node_view ($node, $view_mode, $langcode)
 
 tripal_organism_node_insert ($node)
 
 tripal_organism_node_update ($node)
 
 chado_organism_chado_node_default_title_format ()
 
 chado_organism_chado_node_default_url_format ()
 

Detailed Description

Implements the organims node content type

Function Documentation

◆ chado_organism_add_image()

chado_organism_add_image (   $node)

Adds the image to the organism node and cleans up any old images.

Parameters
$nodeThe node object.

◆ chado_organism_chado_node_default_title_format()

chado_organism_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 organism nodes based on chado fields.

◆ chado_organism_chado_node_default_url_format()

chado_organism_chado_node_default_url_format ( )

Implements hook_chado_node_default_url_format().

Designates a default URL format for organism nodes.

◆ chado_organism_delete()

chado_organism_delete (   $node)

Implements hook_delete().

Delete organism from both drupal and chado databases. Check dependency before deleting from chado.

◆ chado_organism_form()

chado_organism_form (   $node,
  $form_state 
)

Implement hook_form().

When editing or creating a new node of type 'chado_organism' we need a form. This function creates the form that will be used for this.

◆ chado_organism_insert()

chado_organism_insert (   $node)

Implements hook_insert().

When a new chado_organism node is created we also need to add information to our chado_organism table. This function is called on insert of a new node of type 'chado_organism' and inserts the necessary information.

◆ chado_organism_load()

chado_organism_load (   $nodes)

Implements hook_load().

When a node is requested by the user this function is called to allow us to add auxiliary data to the node object.

◆ chado_organism_update()

chado_organism_update (   $node)

Implements hook_update().

◆ chado_organism_validate()

chado_organism_validate (   $node,
  $form,
$form_state 
)

Implementation of hook_validate().

Parameters
$node
$form
$form_state

◆ tripal_organism_node_access()

tripal_organism_node_access (   $node,
  $op,
  $account 
)

Implement hook_node_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_organism_node_info()

tripal_organism_node_info ( )

Implements hook_node_info().

Provide information to drupal about the node types that we're creating in this module

◆ tripal_organism_node_insert()

tripal_organism_node_insert (   $node)

Implements hook_node_insert(). Acts on all content types.

◆ tripal_organism_node_presave()

tripal_organism_node_presave (   $node)

Implements hook_node_presave(). Acts on all content types.

Parameters
$nodeThe node to be saved

◆ tripal_organism_node_update()

tripal_organism_node_update (   $node)

Implements hook_node_update(). Acts on all content types.

◆ tripal_organism_node_view()

tripal_organism_node_view (   $node,
  $view_mode,
  $langcode 
)

Implements hook_node_view().