function tripal_library_admin

2.x tripal_library.admin.inc tripal_library_admin()
3.x tripal_library.admin.inc tripal_library_admin()
1.x tripal_library.admin.inc tripal_library_admin()

Administrative settings form

Related topics

1 string reference to 'tripal_library_admin'
tripal_library_menu in tripal_library/tripal_library.module
Implements hook_menu().

File

tripal_library/includes/tripal_library.admin.inc, line 47
Admin launchpad

Code

function tripal_library_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_library', // the name of the MODULE implementing the content type
    'content_type' => 'chado_library', // 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(
      '[library.name]' => 'Library Name Only',
      // there should always be one options matching the unique constraint.
      '[library.name], [library.uniquename] ([library.type_id>cvterm.name]) [library.organism_id>organism.genus] [library.organism_id>organism.species]' => 'Unique Contraint: Includes the name, type and organism scientific name'
    ),
    // the token indicating the unique constraint in the options array
    'unique_option' => '[library.name], [library.uniquename] ([library.type_id>cvterm.name]) [library.organism_id>organism.genus] [library.organism_id>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_library',
    'content_type' => 'chado_library',
    'options' => array(
      '/library/[library.library_id]' => 'Library ID',
      '/library/[library.organism_id>organism.genus]/[library.organism_id>organism.species]/[library.type_id>cvterm.name]/[library.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);
}