[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/views/plugins/ -> views_plugin_style_list.inc (source)

   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   */
  12  class 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  
  21      return $options;
  22    }
  23  
  24    /**
  25     * Render the given style.
  26     */
  27    function options_form(&$form, &$form_state) {
  28      parent::options_form($form, $form_state);
  29      $form['type'] = array(
  30        '#type' => 'radios',
  31        '#title' => t('List type'),
  32        '#options' => array('ul' => t('Unordered list'), 'ol' => t('Ordered list')),
  33        '#default_value' => $this->options['type'],
  34      );
  35    }
  36  }
  37  


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7