Tripal v1.0 (6.x-1.0)
|
Go to the source code of this file.
Functions | |
tripal_views_menu () | |
tripal_views_init () | |
tripal_views_perm () | |
tripal_views_views_api () | |
tripal_views_theme () | |
tripal_views_coder_ignore () | |
tripal_views_biological_data_page () | |
tripal_views_form_alter (&$form, &$form_state, $form_id) |
tripal_views_biological_data_page | ( | ) |
A landing page for all views of chado content. Simply lists all menu items that are children of it.
Definition at line 193 of file tripal_views.module.
{ $output = ''; $item = menu_get_item(); $content = system_admin_menu_block($item); $output .= '<dl class="admin-list">'; foreach ($content as $item) { $output .= '<dt>'. l($item['title'], $item['href'], $item['localized_options']) .'</dt>'; $output .= '<dd>'. $item['description'] .'</dd>'; } $output .= '</dl>'; return $output; }
tripal_views_coder_ignore | ( | ) |
Implements hook_coder_ignore(). Defines the path to the file (tripal_views.coder_ignores.txt) where ignore rules for coder are stored
Definition at line 182 of file tripal_views.module.
{ return array( 'path' => drupal_get_path('module', 'tripal_views'), 'line prefix' => drupal_get_path('module', 'tripal_views'), ); }
tripal_views_form_alter | ( | &$ | form, |
&$ | form_state, | ||
$ | form_id | ||
) |
Definition at line 212 of file tripal_views.module.
{ if ($form_id == "tripal_views_integration_form") { // updating the form through the ahah callback sets the action of // the form to the ahah callback URL. We need to set it back // to the normal form URL if ($form_state['values']['setup_id']) { $form['#action'] = url("admin/tripal/views/integration/edit/" . $form_state['values']['setup_id']); } else { $form['#action'] = url("admin/tripal/views/integration/new"); } } }
tripal_views_init | ( | ) |
Implements hook_init().
Definition at line 111 of file tripal_views.module.
{ // Need to ensure that all chado tables are integrated w/out making // the user go to views UI. It would be ideal to do this in a hook called only once // directly after install/enabling of the module but such a hook doesn't // exist in Drupal 6 $tripal_views = db_fetch_object(db_query("SELECT true as has_rows FROM {tripal_views}")); if (!$tripal_views->has_rows) { tripal_views_integrate_all_chado_tables(); } }
tripal_views_menu | ( | ) |
Implements hook_menu()
Purpose: this hook provides details about new menu items added by this module
Definition at line 16 of file tripal_views.module.
{ $items = array(); $items['chado'] = array( 'title' => 'Search Biological Data', 'description' => 'Listings of the various biological data available categorized by type.', 'page callback' => 'tripal_views_biological_data_page', 'access arguments' => array('access content'), 'expanded' => TRUE, 'type' => MENU_NORMAL_ITEM, ); $items['admin/tripal/views'] = array( 'title' => 'Views Integration', 'description' => 'Integration with Drupal Views', 'page callback' => 'tripal_views_description_page', 'access arguments' => array('administer site configuration'), 'type' => MENU_NORMAL_ITEM, ); $items['admin/tripal/views/integration/list'] = array( 'title' => 'List of Integrated Tables', 'description' => 'Provide a list of all integrated tables and allows for adding new tables or editing already integrated tables.', 'page callback' => 'tripal_views_integration_setup_list', 'access arguments' => array('manage tripal_views_integration'), 'type' => MENU_NORMAL_ITEM, 'weight' => 0, ); $items['admin/tripal/views/integration/new'] = array( 'title' => 'Integrate A Table', 'page callback' => 'drupal_get_form', 'page arguments' => array('tripal_views_integration_form'), 'access arguments' => array('manage tripal_views_integration'), 'type' => MENU_NORMAL_ITEM, ); $items['admin/tripal/views/integration/edit/%'] = array( 'title' => 'Edit Views Integration', 'page callback' => 'drupal_get_form', 'page arguments' => array('tripal_views_integration_form', 5), 'access arguments' => array('manage tripal_views_integration'), 'type' => MENU_CALLBACK, ); $items['admin/tripal/views/integration/delete/%'] = array( 'title' => 'Delete Views Integration', 'page callback' => 'tripal_views_integration_delete', 'page arguments' => array(5), 'access arguments' => array('manage tripal_views_integration'), 'type' => MENU_CALLBACK, ); $items['admin/tripal/views/import'] = array( 'title' => 'Import Views Integration', 'page callback' => 'drupal_get_form', 'page arguments' => array('tripal_views_integration_import_form'), 'access arguments' => array('manage tripal_views_integration'), 'type' => MENU_NORMAL_ITEM, ); $items['admin/tripal/views/integration/export/%'] = array( 'title' => 'Import Views Integration', 'page callback' => 'drupal_get_form', 'page arguments' => array('tripal_views_integration_export_form', 5), 'access arguments' => array('manage tripal_views_integration'), 'type' => MENU_CALLBACK, ); // Menu item for the AJAX callback function that retrieves the // portion of the form that contains all of the fields for the table being integrated $items['tripal/views/integration/ajax/view_setup_table'] = array( 'title' => 'Import Views Integration', 'page callback' => 'tripal_views_integration_ajax_view_setup_table', 'page arguments' => array(), 'access arguments' => array('manage tripal_views_integration'), 'type' => MENU_CALLBACK, ); // Menu item for the AJAX callback function that retrieves the list of // column names for the table that is selected to be joined. $items['tripal/views/integration/ajax/join_field/%/%'] = array( 'title' => 'Import Views Integration', 'page callback' => 'tripal_views_integration_ajax_join_field', 'page arguments' => array(5, 6), 'access arguments' => array('manage tripal_views_integration'), 'type' => MENU_CALLBACK, ); return $items; }
tripal_views_perm | ( | ) |
Implements hook_views_api()
Purpose: Set the permission types that the chado module uses.
Definition at line 130 of file tripal_views.module.
{ return array( 'manage tripal_views_integration', ); }
tripal_views_theme | ( | ) |
Implements hook_theme()
Purpose: this hook provides details about themable objects added by this module
Definition at line 159 of file tripal_views.module.
{ return array( 'tripal_views_integration_form' => array( 'arguments' => array('form' => NULL), 'template' => 'tripal_views_integration_fields_form', ), 'tripal_views_data_export_download_form' => array( 'arguments' => array('form' => NULL), 'template' => 'tripal_views_data_export_download_form', ), 'file_upload_combo' => array( 'arguments' => array('element' => NULL) ), 'sequence_combo' => array( 'arguments' => array('element' => NULL) ), ); }
tripal_views_views_api | ( | ) |
Implements hook_views_api()
Purpose: Essentially this hook tells drupal that there is views support for for this module which then includes tripal_views.views.inc where all the views integration code is
Definition at line 145 of file tripal_views.module.
{ return array( 'api' => 2.0, ); }