function tripal_organism_admin
2.x tripal_organism.admin.inc | tripal_organism_admin() |
3.x tripal_organism.admin.inc | tripal_organism_admin() |
1.x tripal_organism.admin.inc | tripal_organism_admin() |
Administrative settings for chado_orgnism
Related topics
1 string reference to 'tripal_organism_admin'
- tripal_organism_menu in legacy/
tripal_organism/ tripal_organism.module - Implements hook_menu().
File
- legacy/
tripal_organism/ includes/ tripal_organism.admin.inc, line 47 - Administration of organisms
Code
function tripal_organism_admin() {
$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_organism', // the name of the MODULE implementing the content type
'content_type' => 'chado_organism', // 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(
'[organism.name]' => 'Organism Name Only',
// there should always be one options matching the unique constraint.
'[organism.genus] [organism.species]' => 'Unique Contraint: The scientific name'
),
// the token indicating the unique constraint in the options array
'unique_option' => '[organism.genus] [organism.species]'
);
// 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_organism',
'content_type' => 'chado_organism',
'options' => array(
'/organism/[organism.organism_id]' => 'Organism ID',
'/organism/[organism.abbreviation]' => 'The abbreviation for the organism',
'/organism/[organism.common_name]' => 'The common name of the organism',
'/organism/[organism.genus]/[organism.species]' => 'Unique Contraint: the scientific 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);
}