function tripal_project_admin

2.x tripal_project.admin.inc tripal_project_admin($form, $form_state)
3.x tripal_project.admin.inc tripal_project_admin($form, $form_state)
1.x tripal_project.admin.inc tripal_project_admin($form_state = NULL)

Project settings

Related topics

1 string reference to 'tripal_project_admin'
tripal_project_menu in legacy/tripal_project/tripal_project.module
Implements hook_menu().

File

legacy/tripal_project/includes/tripal_project.admin.inc, line 46
Administration of projects

Code

function tripal_project_admin($form, $form_state) {
  $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_project', // the name of the MODULE implementing the content type
    'content_type' => 'chado_project', // 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(
      '[project.name]' => 'project Name Only',
      // there should always be one options matching the unique constraint.
      '[project.name]' => 'Unique Contraint: The project name'
    ),
    // the token indicating the unique constraint in the options array
    'unique_option' => '[project.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_title($form, $form_state, $details);

  // If the module is using the "Chado Node: Title & Path API" to allow custom URLs
  // for your node type then you need to add the configuration form for this functionality.
  $details = array(
    'module' => 'tripal_project', // the name of the MODULE implementing the content type
    'content_type' => 'chado_project', // the name of the content type
    // An array of options to use under "Page URLs"
    // the key should be the token and the value should be the human-readable option
    'options' => array(
      '/project/[project.name]' => 'Project Name Only',
      // there should always be one options matching the unique constraint.
      // If you have a more human-readable constraint, then that is preferrable.
      // See the tripal feature module for a good example of this.
      '/project/[project.project_id]' => 'Unique Contraint: The Project ID'
    ),
  );
  // 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);
}