function tripal_core_job_describe_args

2.x tripal_core.module tripal_core_job_describe_args($callback, $args)
1.x tripal_core.module tripal_core_job_describe_args($callback, $args)

Implements hook_job_describe_args(). Describes the arguments for the tripal_populate_mview job to allow for greater readability in the jobs details pages.

Parameters

$callback: The callback of the current tripal job (this is the function that will be executed when tripal_launch_jobs.php is run.

$args: An array of arguments passed in when the job was registered.

Return value

A more readable $args array

Related topics

File

tripal_core/tripal_core.module, line 537
The Tripal Core module

Code

function tripal_core_job_describe_args($callback, $args) {
  $new_args = array();
  if ($callback == 'tripal_populate_mview') {
    // get this mview details
    $sql = "SELECT * FROM {tripal_mviews} WHERE mview_id = :mview_id ";
    $results = db_query($sql, array(':mview_id' => $args[0]));
    $mview = $results->fetchObject();
    $new_args['View Name'] = $mview->name;
  }

  elseif ($callback == 'tripal_core_install_chado') {
    $new_args['Action'] = $args[0];
  }
  return $new_args;
}