Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/taxonomy/views_handler_argument_term_node_tid_depth.inc | ||
---|---|---|
14 | 14 |
* @ingroup views_argument_handlers |
15 | 15 |
*/ |
16 | 16 |
class views_handler_argument_term_node_tid_depth extends views_handler_argument { |
17 |
function option_definition() { |
|
17 |
|
|
18 |
/** |
|
19 |
* {@inheritdoc} |
|
20 |
*/ |
|
21 |
public function option_definition() { |
|
18 | 22 |
$options = parent::option_definition(); |
19 | 23 |
|
20 | 24 |
$options['depth'] = array('default' => 0); |
... | ... | |
25 | 29 |
return $options; |
26 | 30 |
} |
27 | 31 |
|
28 |
function options_form(&$form, &$form_state) { |
|
32 |
/** |
|
33 |
* {@inheritdoc} |
|
34 |
*/ |
|
35 |
public function options_form(&$form, &$form_state) { |
|
29 | 36 |
$form['depth'] = array( |
30 | 37 |
'#type' => 'weight', |
31 | 38 |
'#title' => t('Depth'), |
... | ... | |
57 | 64 |
parent::options_form($form, $form_state); |
58 | 65 |
} |
59 | 66 |
|
60 |
function set_breadcrumb(&$breadcrumb) { |
|
67 |
/** |
|
68 |
* {@inheritdoc} |
|
69 |
*/ |
|
70 |
public function set_breadcrumb(&$breadcrumb) { |
|
61 | 71 |
if (empty($this->options['set_breadcrumb']) || !is_numeric($this->argument)) { |
62 | 72 |
return; |
63 | 73 |
} |
... | ... | |
68 | 78 |
/** |
69 | 79 |
* Override default_actions() to remove summary actions. |
70 | 80 |
*/ |
71 |
function default_actions($which = NULL) { |
|
81 |
public function default_actions($which = NULL) {
|
|
72 | 82 |
if ($which) { |
73 | 83 |
if (in_array($which, array('ignore', 'not found', 'empty', 'default'))) { |
74 | 84 |
return parent::default_actions($which); |
... | ... | |
83 | 93 |
return $actions; |
84 | 94 |
} |
85 | 95 |
|
86 |
function query($group_by = FALSE) { |
|
96 |
/** |
|
97 |
* {@inheritdoc} |
|
98 |
*/ |
|
99 |
public function query($group_by = FALSE) { |
|
87 | 100 |
$this->ensure_my_table(); |
88 | 101 |
|
89 | 102 |
if (!empty($this->options['break_phrase'])) { |
... | ... | |
134 | 147 |
$this->query->add_where(0, "$this->table_alias.$this->real_field", $subquery, 'IN'); |
135 | 148 |
} |
136 | 149 |
|
137 |
function title() { |
|
150 |
/** |
|
151 |
* {@inheritdoc} |
|
152 |
*/ |
|
153 |
public function title() { |
|
138 | 154 |
$term = taxonomy_term_load($this->argument); |
139 | 155 |
if (!empty($term)) { |
140 | 156 |
return check_plain($term->name); |
141 | 157 |
} |
142 |
// TODO review text
|
|
158 |
// @todo review text.
|
|
143 | 159 |
return t('No name'); |
144 | 160 |
} |
161 |
|
|
145 | 162 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules