function tripal_analysis_admin
2.x tripal_analysis.admin.inc | tripal_analysis_admin() |
3.x tripal_analysis.admin.inc | tripal_analysis_admin() |
1.x tripal_analysis.admin.inc | tripal_analysis_admin() |
Administration page callbacks for the Tripal Analysis module
Return value
A form API array describing an administrative form
Related topics
1 string reference to 'tripal_analysis_admin'
- tripal_analysis_menu in tripal_analysis/
tripal_analysis.module - Implementation of hook_menu(). Entry points and paths of the module
File
- tripal_analysis/
includes/ tripal_analysis.admin.inc, line 53 - Contains functions displaying administrative pages and forms.
Code
function tripal_analysis_admin() {
// Create a new administrative form. We'll add main functions to the form
// first (Sync, Reindex, Clean, Taxonify). Thereafter, any sub-module that
// has a setting will be added.
$form = array();
// If your module is using the Chado Node: Title & Path API to allow custom titles
// for your node type then you need to add the configuration form for this functionality.
$details = array(
'module' => 'tripal_analysis', // the name of the MODULE implementing the content type
'content_type' => 'chado_analysis', // the name of the content type
// An array of options to use under "Page Titles"
// the key should be the token and the value should be the human-readable option
'options' => array(
'[analysis.name]' => 'Analysis Name Only',
// there should always be one options matching the unique constraint.
'[analysis.name] ([analysis.sourcename]) [analysis.program] version [analysis.programversion]' => 'Unique Contraint: Includes the name, source and program name/version'
),
// the token indicating the unique constraint in the options array
'unique_option' => '[analysis.name] ([analysis.sourcename]) [analysis.program] version [analysis.programversion]'
);
// This call adds the configuration form to your current form
// This sub-form handles it's own validation & submit
chado_add_admin_form_set_title($form, $form_state, $details);
// URL ALIAS
$details = array(
'module' => 'tripal_analysis',
'content_type' => 'chado_analysis',
'options' => array(
'/analysis/[analysis.analysis_id]' => 'Analysis ID',
'/analysis/[analysis.program]/[analysis.programversion]/[analysis.sourcename]' => 'Unique Contraint: Includes the program name & version as well as the source name'
),
);
// This call adds the configuration form to your current form
// This sub-form handles it's own validation & submit
chado_add_admin_form_set_url($form, $form_state, $details);
return system_settings_form($form);
}