stableversion-3.0
Last change
on this file since 177a560 was
177a560,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se agrego el directorio de modulos contribuidos de drupal
|
-
Propiedad mode establecida a
100644
|
File size:
902 octetos
|
Línea | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * Field handler display a profile list item. |
---|
4 | */ |
---|
5 | class views_handler_field_profile_list extends views_handler_field_prerender_list { |
---|
6 | /** |
---|
7 | * Break up our field into a proper list. |
---|
8 | */ |
---|
9 | function pre_render($values) { |
---|
10 | $this->items = array(); |
---|
11 | foreach ($values as $value) { |
---|
12 | $field = $value->{$this->field_alias}; |
---|
13 | $this->items[$field] = array(); |
---|
14 | foreach (split("[,\n\r]", $field) as $item) { |
---|
15 | if ($item != '' && $item !== NULL) { |
---|
16 | $this->items[$field][] = array('item' => $item); |
---|
17 | } |
---|
18 | } |
---|
19 | } |
---|
20 | } |
---|
21 | |
---|
22 | function render_item($count, $item) { |
---|
23 | return $item['item']; |
---|
24 | } |
---|
25 | |
---|
26 | function document_self_tokens(&$tokens) { |
---|
27 | $tokens['[' . $this->options['id'] . '-item' . ']'] = t('The text of the profile item.'); |
---|
28 | } |
---|
29 | |
---|
30 | function add_self_tokens(&$tokens, $item) { |
---|
31 | $tokens['[' . $this->options['id'] . '-item' . ']'] = $item['item']; |
---|
32 | } |
---|
33 | } |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.