Tripal
|
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) | |
Tripal Bulk Loader Node functionality (jobs).
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 | ( | $node, | |
$form_state | |||
) |
Implements hook_form(). Used to gather the extra details stored with a Bulk Loading Job Node
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 | ( | $nodes | ) |
Implements hook_load().
D7 Changes: now loads all $nodes at once so need to add loops
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.
$op | The operation to be performed |
$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 |
$account | A user object representing the user for whom the operation is to be performed |
tripal_bulk_loader_node_info | ( | ) |
Implements hook_node_info().
tripal_bulk_loader_node_presave | ( | $node | ) |
Implements hook_node_presave(). Acts on all node types.
tripal_bulk_loader_node_view | ( | $node, | |
$view_mode, | |||
$langcode | |||
) |
Implements hook_node_view(). Acts on all content types.
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))); } }