From 06e5b1554a55cb0add7573110ef908c1139d1234 Mon Sep 17 00:00:00 2001 From: DannyJoris Date: Thu, 1 Nov 2012 01:03:17 -0300 Subject: [PATCH 1/6] moved solution pack viewer admin and viewer callback functions into islandora, away from the solution packs --- includes/solution_packs.inc | 217 ++++++++++++++++++++++++++++++++++++ islandora.module | 12 ++ 2 files changed, 229 insertions(+) diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc index 4d124a71..37e5474f 100644 --- a/includes/solution_packs.inc +++ b/includes/solution_packs.inc @@ -483,5 +483,222 @@ function islandora_check_object_status($object_model = array()) { } } +/** + * A form construct to create a viewer selection table. + * + * @TODO: documentation + */ +function islandora_viewers_form($variable_id = NULL, $mimetype = NULL) { + $form = array(); + // get viewers + $viewers = islandora_get_viewers($mimetype); + if (!empty($viewers)) { + // add option for no viewer + $no_viewer = array(); + $no_viewer['none'] = array( + 'label' => t('None'), + 'description' => t('Don\'t use a viewer for this solution pack.'), + ); + // merge to viewers array + $viewers = array_merge_recursive($no_viewer, $viewers); + } + // get viewer settings + $viewers_config = variable_get($variable_id, array()); + // viewer + $form['viewers'] = array( + '#type' => 'fieldset', + '#title' => t('Viewers'), + '#collapsible' => FALSE, + '#collapsed' => FALSE, + ); + + if (!empty($viewers)) { + // viewers table + $form['viewers'][$variable_id] = array( + '#type' => 'item', + '#title' => t('Select a viewer'), + '#description' => t('Preferred viewer for your solution pack. These may be provided by third-party modules.'), + '#tree' => TRUE, // this attribute is important to return the submitted values in a deeper nested arrays in + '#theme' => 'islandora_viewers_table', + ); + + // table loop + foreach ($viewers as $name => $profile) { + + $options[$name] = ''; + // machine name + $form['viewers'][$variable_id]['name'][$name] = array( + '#type' => 'hidden', + '#value' => $name, + ); + // label + $form['viewers'][$variable_id]['label'][$name] = array( + '#type' => 'item', + '#markup' => $profile['label'], + ); + // description + $form['viewers'][$variable_id]['description'][$name] = array( + '#type' => 'item', + '#markup' => $profile['description'], + ); + // configuration url + $form['viewers'][$variable_id]['configuration'][$name] = array( + '#type' => 'item', + '#markup' => (isset($profile['configuration']) AND $profile['configuration'] != '') ? l(t('configure'), $profile['configuration']) : '', + ); + } + // radios + $form['viewers'][$variable_id]['default'] = array( + '#type' => 'radios', + '#options' => isset($options) ? $options : array(), + '#default_value' => !empty($viewers_config) ? $viewers_config['default'] : 'none', + ); + } + else { + // No viewers found + $form['viewers'][$variable_id . '_no_viewers'] = array( + '#markup' => t('No viewers detected.'), + ); + // remove viewers variable + variable_del($variable_id); + } + return $form; +} + +/** + * Returns all defined viewers. + * + * @param string $mimetype + * specify a mimetype to return only viewers that support this certain mimetype. + * @return + * array of viewer definitions, or FALSE if none are found. + */ +function islandora_get_viewers($mimetype = NULL) { + $viewers = array(); + // get all viewers + $defined_viewers = module_invoke_all('islandora_viewer_info'); + // filter viewers by mimetype + foreach($defined_viewers as $key => $value) { + if (in_array($mimetype, $value['mimetype']) OR $mimetype == NULL) { + $viewers[$key] = $value; + } + } + if (!empty($viewers)) { + return $viewers; + } + return FALSE; +} + +/** + * Theme function for the admin primary display table + * + * @param type $variables + * render element: $form + * Contains the form array + * @return + * rendered form element + * + * @see islandora_large_image_admin() + */ +function theme_islandora_viewers_table($variables) { + // set form + $form = $variables['form']; + $rows = array(); + + foreach ($form['name'] as $key => $element) { + // Do not take form control structures. + if (is_array($element) && element_child($key)) { + // set rows + $row = array(); + $row[] = array('data' => drupal_render($form['default'][$key])); + $row[] = array('data' => drupal_render($form['label'][$key])); + $row[] = array('data' => drupal_render($form['description'][$key])); + $row[] = array('data' => drupal_render($form['configuration'][$key])); + + // add to rows + $rows[] = array('data' => $row); + } + } + + // Individual table headers. + // default | label | description | configuration + $header = array(); + $header[] = array('data' => t('Default')); + $header[] = array('data' => t('Label')); + $header[] = array('data' => t('Description')); + $header[] = array('data' => t('Configuration')); + + // render form + $output = ''; + $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'islandora-viewers-table'))); + $output .= drupal_render_children($form); + + return $output; +} + +/** + * Gather information and return a rendered viewer + * + * @TODO add documentation + */ +function islandora_get_viewer($object_id = NULL, $dsid = NULL, $settings_id = NULL) { + // get viewer from settings + $settings = variable_get($settings_id, array()); + // make sure a viewer is set + if (!empty($settings) AND $settings['default'] !== 'none') { + // create url + $url = islandora_get_viewer_url($object_id, $dsid); + // get callback function + $viewer_id = islandora_get_viewer_id($settings_id); + if ($viewer_id) { + $callback = islandora_get_viewer_callback($viewer_id); + // call callback function + return $callback($url); + } + } + return NULL; +} +/** + * Get the url to be passed to the viewer. + * + * @TODO add documentation + */ +function islandora_get_viewer_url($object_id = NULL, $dsid = NULL) { + global $base_url; + if ($object_id !== NULL AND $dsid !== NULL) { + $url = $base_url . '/islandora/object/' . $object_id . '/datastream/' . $dsid . '/view'; + return $url; + } + return FALSE; +} +/** + * Get id of the enabled viewer. + * + * @TODO add documentation + */ +function islandora_get_viewer_id() { + $viewers_config = variable_get('islandora_large_image_viewers', array()); + if (!empty($viewers_config)) { + return $viewers_config['default']; + } + return FALSE; +} + +/** + * Get callback function for a viewer. + * + * @TODO add documentation + */ +function islandora_get_viewer_callback($viewer_id = NULL) { + if ($viewer_id !== NULL) { + // get defined viewers + $viewers = module_invoke_all('islandora_viewer_info'); + if (isset($viewers[$viewer_id]['callback'])) { + // return callback function + return $viewers[$viewer_id]['callback']; + } + } + return FALSE; +} \ No newline at end of file diff --git a/islandora.module b/islandora.module index d1df4d48..6c06d8aa 100644 --- a/islandora.module +++ b/islandora.module @@ -415,16 +415,23 @@ function islandora_default_islandora_view_object($object) { */ function islandora_theme() { return array( + // default object template 'islandora_default' => array( 'file' => 'theme/islandora.theme.inc', 'template' => 'theme/islandora-object', 'variables' => array('islandora_object' => NULL), ), + // default edit page 'islandora_default_edit' => array( 'file' => 'theme/islandora.theme.inc', 'template' => 'theme/islandora-object-edit', 'variables' => array('islandora_object' => NULL), ), + // admin table for solution pack viewer selection + 'islandora_viewers_table' => array( + 'file' => 'includes/solution_packs.inc', + 'render element' => 'form', + ), ); } @@ -634,3 +641,8 @@ function islandora_islandora_required_objects() { ), ); } + + + + + From 8be95dc65ee456cf0c6ccaa4960f42986c0cbbf4 Mon Sep 17 00:00:00 2001 From: DannyJoris Date: Thu, 1 Nov 2012 03:29:18 -0300 Subject: [PATCH 2/6] moved url creation out of the viewer callback function, because in the future this could potentially be an array or anything more custom --- includes/solution_packs.inc | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc index 37e5474f..f905dd64 100644 --- a/includes/solution_packs.inc +++ b/includes/solution_packs.inc @@ -641,16 +641,14 @@ function theme_islandora_viewers_table($variables) { * * @TODO add documentation */ -function islandora_get_viewer($object_id = NULL, $dsid = NULL, $settings_id = NULL) { +function islandora_get_viewer($url = NULL, $settings_id = NULL) { // get viewer from settings $settings = variable_get($settings_id, array()); // make sure a viewer is set if (!empty($settings) AND $settings['default'] !== 'none') { - // create url - $url = islandora_get_viewer_url($object_id, $dsid); // get callback function $viewer_id = islandora_get_viewer_id($settings_id); - if ($viewer_id) { + if ($viewer_id AND $url !== NULL) { $callback = islandora_get_viewer_callback($viewer_id); // call callback function return $callback($url); @@ -659,20 +657,6 @@ function islandora_get_viewer($object_id = NULL, $dsid = NULL, $settings_id = NU return NULL; } -/** - * Get the url to be passed to the viewer. - * - * @TODO add documentation - */ -function islandora_get_viewer_url($object_id = NULL, $dsid = NULL) { - global $base_url; - if ($object_id !== NULL AND $dsid !== NULL) { - $url = $base_url . '/islandora/object/' . $object_id . '/datastream/' . $dsid . '/view'; - return $url; - } - return FALSE; -} - /** * Get id of the enabled viewer. * From ea22f8ed441a1f5e5695aecb371a10dcb9b405b0 Mon Sep 17 00:00:00 2001 From: DannyJoris Date: Mon, 5 Nov 2012 20:40:14 -0400 Subject: [PATCH 3/6] cleanup --- admin/islandora.admin.inc | 2 + includes/solution_packs.inc | 2 + islandora.api.php | 25 +++++- islandora.module | 168 +++++++++++++++++------------------- 4 files changed, 108 insertions(+), 89 deletions(-) diff --git a/admin/islandora.admin.inc b/admin/islandora.admin.inc index e3aeb60c..c6c48957 100644 --- a/admin/islandora.admin.inc +++ b/admin/islandora.admin.inc @@ -13,6 +13,8 @@ function islandora_repository_admin($form, &$form_state) { module_load_include('inc', 'islandora', 'includes/tuque'); module_load_include('inc', 'islandora', 'includes/utilities'); + // add css + drupal_add_css(drupal_get_path('module', 'islandora') . '/css/islandora.admin.css'); if (!IslandoraTuque::exists()) { IslandoraTuque::getError(); diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc index f905dd64..00545720 100644 --- a/includes/solution_packs.inc +++ b/includes/solution_packs.inc @@ -9,6 +9,8 @@ * Solution pack admin page callback */ function islandora_solution_packs_admin() { + // add css + drupal_add_css(drupal_get_path('module', 'islandora') . '/css/islandora.admin.css'); // check connection module_load_include('inc', 'islandora', 'includes/utilities'); $url = variable_get('islandora_base_url', 'http://localhost:8080/fedora'); diff --git a/islandora.api.php b/islandora.api.php index dff4c217..9e6d6b92 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -126,7 +126,7 @@ function hook_CMODEL_PID_islandora_pre_purge_object($fedora_object) {} function hook_islandora_ingest_registry($collection_object) { $reg = array( array( - 'name' => t('Ingest Route Name'), + 'name' => t('Ingest route name'), 'url' => 'ingest_route/url', 'weight' => 0, ), @@ -195,3 +195,26 @@ function hook_islandora_post_purge_datastream($object, $dsid) {} */ function hook_islandora_post_purge_object($object_id, $content_models) {} +/** + * Registry hook for required objects. + * + * Solution packs can include data to create certain objects that describe or + * help the objects it would create. This includes collection objects and content + * models. + * + * @see islandora_solution_packs_admin() + * @see islandora_install_solution_pack() + * @example islandora_islandora_required_objects() + */ +function hook_islandora_required_objects() {} + +/** + * Registry hook for viewers that can be implemented by solution packs. + * + * Solution packs can use viewers for their data. This hook lets Islandora know + * which viewers there are available. + * + * @see islandora_get_viewers() + * @see islandora_get_viewer_callback() + */ +function hook_islandora_viewer_info() {} \ No newline at end of file diff --git a/islandora.module b/islandora.module index 6c06d8aa..84659bce 100644 --- a/islandora.module +++ b/islandora.module @@ -223,6 +223,84 @@ function islandora_admin_paths() { return $paths; } +/** + * Implements hook_theme(). + * + * @return array + */ +function islandora_theme() { + return array( + // default object template + 'islandora_default' => array( + 'file' => 'theme/islandora.theme.inc', + 'template' => 'theme/islandora-object', + 'variables' => array('islandora_object' => NULL), + ), + // default edit page + 'islandora_default_edit' => array( + 'file' => 'theme/islandora.theme.inc', + 'template' => 'theme/islandora-object-edit', + 'variables' => array('islandora_object' => NULL), + ), + // admin table for solution pack viewer selection + 'islandora_viewers_table' => array( + 'file' => 'includes/solution_packs.inc', + 'render element' => 'form', + ), + ); +} + +/** + * Implements hook_permission(). + * + * @return array + */ +function islandora_permission() { + return array( + FEDORA_VIEW => array( + 'title' => t('View repository objects and datastreams'), + 'description' => t('View objects in the repository and their associated datastreams. Note: Fedora XACML security policies may override this permission.') + ), + FEDORA_ADD_DS => array( + 'title' => t('Add datastreams to repository objects'), + 'description' => t('Add datastreams to objects in the repository. Note: Fedora XACML security policies may override this position.') + ), + FEDORA_METADATA_EDIT => array( + 'title' => t('Edit metadata'), + 'description' => t('Edit metadata for objects in the repository.') + ), + FEDORA_INGEST => array( + 'title' => t('Create new repository objects'), + 'description' => t('Create new objects in the repository.') + ), + FEDORA_PURGE => array( + 'title' => t('Permanently remove objects from the repository'), + 'description' => t('Permanently remove objects from the repository.') + ), + FEDORA_MODIFY_STATE => array( + 'title' => t('Change repository object states'), + 'description' => t('Change the state of objects in the repository (e.g. from Active to Inactive).') + ), + FEDORA_MANAGE => array( + 'title' => t('View object management tabs'), + 'description' => t('View tabs that provide object management functions.') + ) + ); +} + +/** + * Implements hook_forms(). + */ +function islandora_forms($form_id) { + $forms = array(); + if (strpos($form_id, 'islandora_solution_pack_form_') !== FALSE) { + $forms[$form_id] = array( + 'callback' => 'islandora_solution_pack_form', + ); + } + return $forms; +} + /** * determines whether we can see the object or not * checks PID namespace permissions, and user permissions @@ -237,9 +315,9 @@ function islandora_access_callback($object = NULL, $perm = NULL) { return FALSE; } - $isRestricted = variable_get('islandora_namespace_restriction_enforced', FALSE); + $is_restricted = variable_get('islandora_namespace_restriction_enforced', FALSE); - if (!$isRestricted) { + if (!$is_restricted) { $namespace_access = TRUE; } else { @@ -251,25 +329,6 @@ function islandora_access_callback($object = NULL, $perm = NULL) { return ($namespace_access && user_access($perm)); } -function islandora_init() { - if (path_is_admin(current_path())) { - drupal_add_css(drupal_get_path('module', 'islandora') . '/css/islandora.admin.css'); - } -} - -/** - * Implements hook_forms(). - */ -function islandora_forms($form_id) { - $forms = array(); - if (strpos($form_id, 'islandora_solution_pack_form_') !== FALSE) { - $forms[$form_id] = array( - 'callback' => 'islandora_solution_pack_form', - ); - } - return $forms; -} - /** * a function to call other modules edit page. If there are not any modules * that handle this function this module will build a default page. @@ -408,71 +467,6 @@ function islandora_default_islandora_view_object($object) { return array('Default output' => $output); } -/** - * Implements hook_theme(). - * - * @return array - */ -function islandora_theme() { - return array( - // default object template - 'islandora_default' => array( - 'file' => 'theme/islandora.theme.inc', - 'template' => 'theme/islandora-object', - 'variables' => array('islandora_object' => NULL), - ), - // default edit page - 'islandora_default_edit' => array( - 'file' => 'theme/islandora.theme.inc', - 'template' => 'theme/islandora-object-edit', - 'variables' => array('islandora_object' => NULL), - ), - // admin table for solution pack viewer selection - 'islandora_viewers_table' => array( - 'file' => 'includes/solution_packs.inc', - 'render element' => 'form', - ), - ); -} - -/** - * Implements hook_permission(). - * - * @return array - */ -function islandora_permission() { - return array( - FEDORA_VIEW => array( - 'title' => t('View repository objects and datastreams'), - 'description' => t('View objects in the repository and their associated datastreams. Note: Fedora XACML security policies may override this permission.') - ), - FEDORA_ADD_DS => array( - 'title' => t('Add datastreams to repository objects'), - 'description' => t('Add datastreams to objects in the repository. Note: Fedora XACML security policies may override this position.') - ), - FEDORA_METADATA_EDIT => array( - 'title' => t('Edit metadata'), - 'description' => t('Edit metadata for objects in the repository.') - ), - FEDORA_INGEST => array( - 'title' => t('Create new repository objects'), - 'description' => t('Create new objects in the repository.') - ), - FEDORA_PURGE => array( - 'title' => t('Permanently remove objects from the repository'), - 'description' => t('Permanently remove objects from the repository.') - ), - FEDORA_MODIFY_STATE => array( - 'title' => t('Change repository object states'), - 'description' => t('Change the state of objects in the repository (e.g. from Active to Inactive).') - ), - FEDORA_MANAGE => array( - 'title' => t('View object management tabs'), - 'description' => t('View tabs that provide object management functions.') - ) - ); -} - /** * A helper function to get a connection and return an object * @@ -608,10 +602,8 @@ function islandora_get_islandora_datastream_version($item = NULL, $dsid = NULL, * Implements hook_islandora_required_objects(). */ function islandora_islandora_required_objects() { - // module path $module_path = drupal_get_path('module', 'islandora'); - return array( 'islandora' => array( 'title' => 'Islandora', From 196e6a62d53d0076481abf338cce052c4998dd39 Mon Sep 17 00:00:00 2001 From: DannyJoris Date: Tue, 6 Nov 2012 10:43:47 -0400 Subject: [PATCH 4/6] added doxygen comments --- includes/solution_packs.inc | 51 ++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc index 00545720..9a05111b 100644 --- a/includes/solution_packs.inc +++ b/includes/solution_packs.inc @@ -485,10 +485,21 @@ function islandora_check_object_status($object_model = array()) { } } +/** + * @defgroup viewer-functions + * @{ + * Helper functions to include viewers for solution packs. + */ + /** * A form construct to create a viewer selection table. * - * @TODO: documentation + * @param string $variable_id + * The id of the Drupal variable to save the viewer settings in + * @param string $mimetype + * The table will be populated with viewers supporting this mimetype + * @return + * A form api array which defines a themed table to select a viewer. */ function islandora_viewers_form($variable_id = NULL, $mimetype = NULL) { $form = array(); @@ -641,19 +652,25 @@ function theme_islandora_viewers_table($variables) { /** * Gather information and return a rendered viewer * - * @TODO add documentation + * @param array/string $params + * Array or string with data the module needs in order to render a full viewer + * @param string $variable_id + * The id of the Drupal variable the viewer settings are saved in + * @return + * The callback to the viewer module. Returns a rendered viewer. Returns FALSE + * if no viewer is set. */ -function islandora_get_viewer($url = NULL, $settings_id = NULL) { +function islandora_get_viewer($params = NULL, $variable_id = NULL) { // get viewer from settings - $settings = variable_get($settings_id, array()); + $settings = variable_get($variable_id, array()); // make sure a viewer is set if (!empty($settings) AND $settings['default'] !== 'none') { // get callback function - $viewer_id = islandora_get_viewer_id($settings_id); - if ($viewer_id AND $url !== NULL) { + $viewer_id = islandora_get_viewer_id($variable_id); + if ($viewer_id AND $params !== NULL) { $callback = islandora_get_viewer_callback($viewer_id); // call callback function - return $callback($url); + return $callback($params); } } return NULL; @@ -662,10 +679,13 @@ function islandora_get_viewer($url = NULL, $settings_id = NULL) { /** * Get id of the enabled viewer. * - * @TODO add documentation + * @param string $variable_id + * The id of the Drupal variable the viewer settings are saved in + * @return + * The enabled viewer id. Returns FALSE if no viewer config is set. */ -function islandora_get_viewer_id() { - $viewers_config = variable_get('islandora_large_image_viewers', array()); +function islandora_get_viewer_id($variable_id) { + $viewers_config = variable_get($variable_id, array()); if (!empty($viewers_config)) { return $viewers_config['default']; } @@ -675,7 +695,10 @@ function islandora_get_viewer_id() { /** * Get callback function for a viewer. * - * @TODO add documentation + * @param string $viewer_id + * The ID of a viewer + * @return + * The callback function as a string as defined by the viewer. */ function islandora_get_viewer_callback($viewer_id = NULL) { if ($viewer_id !== NULL) { @@ -687,4 +710,8 @@ function islandora_get_viewer_callback($viewer_id = NULL) { } } return FALSE; -} \ No newline at end of file +} + +/** + * @} End of "defgroup viewer-functions". + */ From 5c810ea4c8108c822208b7c25c03ce2627ab84be Mon Sep 17 00:00:00 2001 From: DannyJoris Date: Tue, 6 Nov 2012 16:42:13 -0400 Subject: [PATCH 5/6] moved default tab form into islandora + removed passing of $user through invoke function --- includes/solution_packs.inc | 20 +++++++++++++++++++- islandora.module | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc index 9a05111b..222c6b90 100644 --- a/includes/solution_packs.inc +++ b/includes/solution_packs.inc @@ -491,11 +491,29 @@ function islandora_check_object_status($object_model = array()) { * Helper functions to include viewers for solution packs. */ +/** + * A form construct to create a select box for the use of the default tab. + * + * @param string $variable_id + * The ID of the Drupal variable to save the checkbox setting in + */ +function islandora_use_for_default_tab_form($variable_id = NULL) { + $form = array(); + $form[$variable_id] = array( + '#type' => 'checkbox', + '#title' => t('Provide the view for the default tab'), + '#default_value' => variable_get($variable_id, 1), + '#description' => t('Should this module provide the view for the default view tab. If you are seeing unexpected content + on a view tab you may have multiple modules configured to provide content for the default tab.'), + ); + return $form; +} + /** * A form construct to create a viewer selection table. * * @param string $variable_id - * The id of the Drupal variable to save the viewer settings in + * The ID of the Drupal variable to save the viewer settings in * @param string $mimetype * The table will be populated with viewers supporting this mimetype * @return diff --git a/islandora.module b/islandora.module index 84659bce..c12b034b 100644 --- a/islandora.module +++ b/islandora.module @@ -436,7 +436,7 @@ function islandora_view_object($fedora_object = NULL) { // Call cmodel oriented variants first. foreach (islandora_build_hook_list(ISLANDORA_VIEW_HOOK, $fedora_object->models) as $hook) { - $temp = module_invoke_all($hook, $fedora_object, $user, $page_number, $page_size); + $temp = module_invoke_all($hook, $fedora_object, $page_number, $page_size); if (!empty($temp)) { $output = array_merge_recursive($output, $temp); } From f9de06c126737a77e8570050b649bb0a9f49a7b8 Mon Sep 17 00:00:00 2001 From: DannyJoris Date: Tue, 6 Nov 2012 16:49:05 -0400 Subject: [PATCH 6/6] removed checkbox callback function for default tab view --- includes/solution_packs.inc | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc index 222c6b90..ffc8d31f 100644 --- a/includes/solution_packs.inc +++ b/includes/solution_packs.inc @@ -491,24 +491,6 @@ function islandora_check_object_status($object_model = array()) { * Helper functions to include viewers for solution packs. */ -/** - * A form construct to create a select box for the use of the default tab. - * - * @param string $variable_id - * The ID of the Drupal variable to save the checkbox setting in - */ -function islandora_use_for_default_tab_form($variable_id = NULL) { - $form = array(); - $form[$variable_id] = array( - '#type' => 'checkbox', - '#title' => t('Provide the view for the default tab'), - '#default_value' => variable_get($variable_id, 1), - '#description' => t('Should this module provide the view for the default view tab. If you are seeing unexpected content - on a view tab you may have multiple modules configured to provide content for the default tab.'), - ); - return $form; -} - /** * A form construct to create a viewer selection table. *