source: sipes/modules_contrib/views/plugins/views_plugin_style_list.inc @ 65dadeb

stableversion-3.0
Last change on this file since 65dadeb 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: 1.4 KB
Línea 
1<?php
2/**
3 * @file
4 * Contains the list style plugin.
5 */
6
7/**
8 * Style plugin to render each item in an ordered or unordered list.
9 *
10 * @ingroup views_style_plugins
11 */
12class views_plugin_style_list extends views_plugin_style {
13  /**
14   * Set default options
15   */
16  function option_definition() {
17    $options = parent::option_definition();
18
19    $options['type'] = array('default' => 'ul');
20    $options['class'] = array('default' => '');
21    $options['wrapper_class'] = array('default' => 'item-list');
22
23    return $options;
24  }
25
26  /**
27   * Render the given style.
28   */
29  function options_form(&$form, &$form_state) {
30    parent::options_form($form, $form_state);
31    $form['type'] = array(
32      '#type' => 'radios',
33      '#title' => t('List type'),
34      '#options' => array('ul' => t('Unordered list'), 'ol' => t('Ordered list')),
35      '#default_value' => $this->options['type'],
36    );
37    $form['wrapper_class'] = array(
38      '#title' => t('Wrapper class'),
39      '#description' => t('The class to provide on the wrapper, outside the list.'),
40      '#type' => 'textfield',
41      '#size' => '30',
42      '#default_value' => $this->options['wrapper_class'],
43    );
44    $form['class'] = array(
45      '#title' => t('List class'),
46      '#description' => t('The class to provide on the list element itself.'),
47      '#type' => 'textfield',
48      '#size' => '30',
49      '#default_value' => $this->options['class'],
50    );
51  }
52}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.