Project

General

Profile

« Previous | Next » 

Revision b2ebf0d3

Added by Andreas Kohlbecker about 6 years ago

turning theme method theme_cdm_reference_pager into simple markup method

View differences:

modules/cdm_dataportal/cdm_dataportal.module
963 963
}
964 964

  
965 965
/**
966
 * Created a view on a all references contained in the portal.
966
 * Creates a view on a all references contained in the portal.
967 967
 *
968 968
 * This function is used at the path cdm_dataportal/reference/list
969 969
 */
970 970
function cdm_dataportal_view_reference_list($pageNumber) {
971 971
  $referencePager = cdm_ws_page(CDM_WS_REFERENCE, variable_get('cdm_dataportal_search_items_on_page', CDM_DATAPORTAL_SEARCH_ITEMS_ON_PAGE), $pageNumber);
972
  return theme('cdm_reference_pager', array(
973
    'referencePager' => $referencePager,
974
    'path' => 'cdm_dataportal/reference/list/',
975
    ));
972
  cdm_reference_pager($referencePager, 'cdm_dataportal/reference/list/');
976 973
}
977 974

  
978 975
/**
modules/cdm_dataportal/theme/cdm_dataportal.references.theme
14 14
 */
15 15

  
16 16
/**
17
 * @todo Please document this function.
18
 * @see http://drupal.org/node/1354
17
 * Creates a pager widget for the given CDM Pager containing CDM Reference entities.
18
 *
19
 * @param $referencePager object
20
 *    A CDM Pager  containing CDM Reference entities
21
 * @param $path
22
 *    The base path to be used when generating the pager item links
23
 * @$parameters
24
 *
25
 * @return string
26
 *   Markup
19 27
 */
20
function theme_cdm_reference_pager($variables) {
21
  $referencePager = $variables['referencePager'];
22
  $path = $variables['path'];
23
  $parameters = $variables['parameters'];
28
function cdm_reference_pager($referencePager, $path, $parameters) {
29

  
24 30
  drupal_set_title(t('Bibliographic index'), PASS_THROUGH);
25 31
  $out = '';
26 32
  if (count($referencePager->records) > 0) {
......
53 59
 *
54 60
 * Used by:
55 61
 * - theme_cdm_typedesignations
56
 * - theme_cdm_reference_pager
62
 * - cdm_reference_pager
57 63
 * - cdm_taxonRelationships
58 64
 *
59 65
 * @param array $variables
modules/cdm_dataportal/theme/theme_registry.inc
155 155
    'cdm_taxonpage_tab' => array('variables' => array('tabname' => NULL)),
156 156

  
157 157
    // Themes in cdm_dataportal.references.theme.
158
    'cdm_reference_pager' => array('variables' => array(
159
        'referencePager' => NULL,
160
        'path' => NULL,
161
        'parameters' => array(),
162
    )),
163 158
    'cdm_reference' => array('variables' => array(
164 159
        'reference' => NULL,
165 160
        'microReference' => NULL,

Also available in: Unified diff