This repository has been archived on 2025-06-21. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
suitedesk/modules/views/plugins/views_plugin_style_list.inc

37 lines
791 B
PHP

<?php
/**
* @file
* Contains the list style plugin.
*/
/**
* Style plugin to render each item in an ordered or unordered list.
*
* @ingroup views_style_plugins
*/
class views_plugin_style_list extends views_plugin_style {
/**
* Set default options
*/
function option_definition() {
$options = parent::option_definition();
$options['type'] = array('default' => 'ul');
return $options;
}
/**
* Render the given style.
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['type'] = array(
'#type' => 'radios',
'#title' => t('List type'),
'#options' => array('ul' => t('Unordered list'), 'ol' => t('Ordered list')),
'#default_value' => $this->options['type'],
);
}
}