Tripal
Functions
tripal_bulk_loader.chado_node.inc File Reference

Functions

 tripal_bulk_loader_node_info ()
 
 tripal_bulk_loader_form ($node, $form_state)
 
 tripal_bulk_loader_load ($nodes)
 
 tripal_bulk_loader_node_presave ($node)
 
 tripal_bulk_loader_insert ($node)
 
 tripal_bulk_loader_delete ($node)
 
 tripal_bulk_loader_update ($node)
 
 tripal_bulk_loader_node_access ($node, $op, $account)
 
 tripal_bulk_loader_node_view ($node, $view_mode, $langcode)
 

Detailed Description

Tripal Bulk Loader Node functionality (jobs).

Function Documentation

◆ tripal_bulk_loader_delete()

tripal_bulk_loader_delete (   $node)

Implements hook_delete(). Deletes the data when the delete button on the node form is clicked

◆ tripal_bulk_loader_form()

tripal_bulk_loader_form (   $node,
  $form_state 
)

Implements hook_form(). Used to gather the extra details stored with a Bulk Loading Job Node

◆ tripal_bulk_loader_insert()

tripal_bulk_loader_insert (   $node)

Implements hook_insert(). Insert the data from the node form on Create content

D7 Changes: seems to need db_insert; not recommended to change $node

◆ tripal_bulk_loader_load()

tripal_bulk_loader_load (   $nodes)

Implements hook_load().

D7 Changes: now loads all $nodes at once so need to add loops

◆ tripal_bulk_loader_node_access()

tripal_bulk_loader_node_access (   $node,
  $op,
  $account 
)

Implement hook_access().

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

Parameters
$opThe operation to be performed
$nodeThe node on which the operation is to be performed, or, if it does not yet exist, the type of node to be created
$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_bulk_loader_node_info()

tripal_bulk_loader_node_info ( )

Implements hook_node_info().

◆ tripal_bulk_loader_node_presave()

tripal_bulk_loader_node_presave (   $node)

Implements hook_node_presave(). Acts on all node types.

◆ tripal_bulk_loader_node_view()

tripal_bulk_loader_node_view (   $node,
  $view_mode,
  $langcode 
)

Implements hook_node_view(). Acts on all content types.

◆ tripal_bulk_loader_update()

tripal_bulk_loader_update (   $node)

Implements hook_update(). Updates the data submitted by the node form on edit

No job checkbox in the form global $user; if ($node->job) { $job_args[0] =$node->loader_name; $job_args[1] = $node->template_id; $job_args[2] = $node->file; if (is_readable($node->file)) { $fname = preg_replace("/.*\/(.*)/", "$1", $node->file); tripal_add_job("Bulk Load: $fname", 'tripal_bulk_loader', 'tripal_bulk_loader_load_data', $job_args, $user->uid); } else { drupal_set_message(t("Can not open %file. Job not scheduled.", array('file' => $node->file))); } }