stableversion-3.0
Last change
on this file since 59029b2 was
59029b2,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se actualizo la version del modulo views
|
-
Propiedad mode establecida a
100644
|
File size:
905 octetos
|
Línea | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * Simple filter to handle equal to / not equal to filters |
---|
4 | * |
---|
5 | * @ingroup views_filter_handlers |
---|
6 | */ |
---|
7 | class views_handler_filter_equality extends views_handler_filter { |
---|
8 | // exposed filter options |
---|
9 | var $no_single = TRUE; |
---|
10 | |
---|
11 | /** |
---|
12 | * Provide simple equality operator |
---|
13 | */ |
---|
14 | function operator_options() { |
---|
15 | return array( |
---|
16 | '=' => t('Is equal to'), |
---|
17 | '!=' => t('Is not equal to'), |
---|
18 | ); |
---|
19 | } |
---|
20 | |
---|
21 | /** |
---|
22 | * Provide a simple textfield for equality |
---|
23 | */ |
---|
24 | function value_form(&$form, &$form_state) { |
---|
25 | $form['value'] = array( |
---|
26 | '#type' => 'textfield', |
---|
27 | '#title' => t('Value'), |
---|
28 | '#size' => 30, |
---|
29 | '#default_value' => $this->value, |
---|
30 | ); |
---|
31 | |
---|
32 | if (!empty($form_state['exposed'])) { |
---|
33 | $identifier = $this->options['expose']['identifier']; |
---|
34 | if (!isset($form_state['input'][$identifier])) { |
---|
35 | $form_state['input'][$identifier] = $this->value; |
---|
36 | } |
---|
37 | } |
---|
38 | } |
---|
39 | } |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.