Révision eefc2ac0
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/themes/bootstrap/templates/system/table.vars.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
|
|
2 | 3 |
/** |
3 | 4 |
* @file |
4 | 5 |
* Stub file for "table" theme hook [pre]process functions. |
... | ... | |
9 | 10 |
* |
10 | 11 |
* See theme function for list of available variables. |
11 | 12 |
* |
13 |
* @param array $variables |
|
14 |
* An associative array of variables, passed by reference. |
|
15 |
* |
|
12 | 16 |
* @see bootstrap_table() |
13 | 17 |
* @see theme_table() |
14 | 18 |
* |
15 | 19 |
* @ingroup theme_preprocess |
16 | 20 |
*/ |
17 |
function bootstrap_preprocess_table(&$variables) { |
|
21 |
function bootstrap_preprocess_table(array &$variables) {
|
|
18 | 22 |
// Prepare classes array if necessary. |
19 | 23 |
if (!isset($variables['attributes']['class'])) { |
20 | 24 |
$variables['attributes']['class'] = array(); |
... | ... | |
36 | 40 |
* @param array $variables |
37 | 41 |
* The variables of the theme hook, passed by reference. |
38 | 42 |
*/ |
39 |
function _bootstrap_table_add_classes(&$classes, &$variables) {
|
|
43 |
function _bootstrap_table_add_classes(array &$classes, array &$variables) {
|
|
40 | 44 |
$context = $variables['context']; |
41 | 45 |
|
42 | 46 |
// Generic table class for all tables. |
... | ... | |
63 | 67 |
} |
64 | 68 |
|
65 | 69 |
// Responsive table. |
66 |
$variables['responsive'] = isset($context['responsive']) ? $context['responsive'] : bootstrap_setting('table_responsive'); |
|
70 |
$responsive = (int) (isset($context['responsive']) ? $context['responsive'] : bootstrap_setting('table_responsive', NULL, 'bootstrap', -1)); |
|
71 |
$variables['responsive'] = $responsive === -1 ? !path_is_admin(current_path()) : !!$responsive; |
|
67 | 72 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules