Projet

Général

Profil

Paste
Télécharger (968 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / libraries / libraries.theme.inc @ 1aa883a3

1
<?php
2

    
3
/**
4
 * @file
5
 * Provides theme and preprocess functions for Libraries API.
6
 */
7

    
8
/**
9
 * Prepare variables for theming a table with a title.
10
 * 
11
 * @param array $variables
12
 *   An array of theme variables, passed by reference.
13
 */
14
function template_preprocess_libraries_table_with_title(&$variables) {
15
  drupal_add_css(drupal_get_path('module', 'libraries') . '/css/libraries.admin.css');
16

    
17
  $variables['attributes'] += array('class' => array());
18
  $variables['attributes']['class'][] = 'libraries-table';
19
}
20

    
21
/**
22
 * Returns HTML for a table with a title.
23
 * 
24
 * @param array $variables
25
 *   An array theme variables.
26
 * 
27
 * @return string
28
 *   The HTML output for this table with a title.
29
 */
30
function theme_libraries_table_with_title(array $variables) {
31
  $output = '';
32
  $output .= '<h2>' . $variables['title'] . '</h2>';
33
  $output .= '<div class="description">' . $variables['description'] . '</div>';
34
  $output .= theme_table($variables);
35
  return $output;
36
}