function tripal_stock_admin
2.x tripal_stock.admin.inc | tripal_stock_admin() |
3.x tripal_stock.admin.inc | tripal_stock_admin() |
1.x tripal_stock.admin.inc | tripal_stock_admin() |
Provide administration options for chado_stocks
Return value
Form array (as described by the drupal form api)
Related topics
1 string reference to 'tripal_stock_admin'
- tripal_stock_menu in legacy/
tripal_stock/ tripal_stock.module - Implements hook_menu(). Adds menu items for the tripal_stock
File
- legacy/
tripal_stock/ includes/ tripal_stock.admin.inc, line 50 - Administration of stocks
Code
function tripal_stock_admin() {
$form = array();
// STOCK PAGE TITLES CONFIGURATION
$details = array(
'module' => 'tripal_stock',
'content_type' => 'chado_stock',
'options' => array(
'[stock.name]' => 'Stock Name Only',
'[stock.uniquename]' => 'Stock Unique Name Only',
'[stock.name], [stock.uniquename] ([stock.type_id>cvterm.name]) [stock.organism_id>organism.genus] [stock.organism_id>organism.species]' => 'Unique Contraint: Includes the name, uniquename, type and scientific name'
),
'unique_option' => '[stock.name], [stock.uniquename] ([stock.type_id>cvterm.name]) [stock.organism_id>organism.genus] [stock.organism_id>organism.species]'
);
chado_add_admin_form_set_title($form, $form_state, $details);
// URL ALIAS
$details = array(
'module' => 'tripal_stock',
'content_type' => 'chado_stock',
'options' => array(
'/stock/[stock.stock_id]' => 'Stock ID',
'/stock/[stock.organism_id>organism.genus]/[stock.organism_id>organism.species]/[stock.type_id>cvterm.name]/[stock.uniquename]' => 'Unique Contraint: Includes the name, uniquename, type and 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);
}