Révision c304a780
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/ctools/plugins/content_types/vocabulary_context/vocabulary_terms.inc | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
/** |
|
4 |
* @file |
|
5 |
*/ |
|
6 |
|
|
3 | 7 |
if (module_exists('taxonomy')) { |
4 | 8 |
/** |
5 | 9 |
* Plugins are described by creating a $plugin array which will be used |
... | ... | |
22 | 26 |
*/ |
23 | 27 |
function ctools_vocabulary_terms_content_type_render($subtype, $conf, $panel_args, $context) { |
24 | 28 |
$vocab = isset($context->data) ? clone $context->data : NULL; |
25 |
$max_depth = (!empty($conf['max_depth']) ? (int)$conf['max_depth'] : NULL); |
|
29 |
$max_depth = (!empty($conf['max_depth']) ? (int) $conf['max_depth'] : NULL);
|
|
26 | 30 |
if ($conf['tree'] == FALSE) { |
27 | 31 |
$terms = taxonomy_get_tree($vocab->vid, 0, $max_depth); |
28 | 32 |
$items = array(); |
... | ... | |
35 | 39 |
$output = theme('item_list', array('items' => _ctools_content_vocabulary_terms($vocab->vid, $max_depth))); |
36 | 40 |
} |
37 | 41 |
|
38 |
$block = new stdClass(); |
|
42 |
$block = new stdClass();
|
|
39 | 43 |
$block->module = 'node_type'; |
40 |
$block->title = check_plain($vocab->name); |
|
44 |
$block->title = check_plain($vocab->name);
|
|
41 | 45 |
$block->content = $output; |
42 | 46 |
$block->delta = $vocab->vid; |
43 | 47 |
|
... | ... | |
97 | 101 |
$form_state['conf'][$key] = $form_state['values'][$key]; |
98 | 102 |
} |
99 | 103 |
} |
100 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules