You are here

function UIkitViewsPluginStyleList::options_form in UIkit Components 7.3

Same name and namespace in other branches
  1. 7.2 uikit_views/plugins/UIkitViewsPluginStyleList.inc \UIkitViewsPluginStyleList::options_form()

Render the given style.

Overrides views_plugin_style::options_form

File

uikit_views/plugins/UIkitViewsPluginStyleList.inc, line 31
Contains the list style plugin.

Class

UIkitViewsPluginStyleList
Style plugin to render each item in UIkit list.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $args = array(
    '@href' => 'https://getuikit.com/docs/list',
    '@title' => 'List component - UIkit documentation',
  );
  $form['wrapper_class'] = array(
    '#title' => t('Wrapper class'),
    '#description' => t('The class to provide on the wrapper, outside the list.'),
    '#type' => 'textfield',
    '#size' => '30',
    '#default_value' => $this->options['wrapper_class'],
  );
  $form['modifier'] = array(
    '#title' => t('List modifider'),
    '#description' => t('The modifier to apply to the list. See <a href="@href" target="_blank" title="@title">List component</a> to view examples of each list modifier.', $args),
    '#type' => 'select',
    '#default_value' => $this->options['modifier'],
    '#options' => array(
      'default' => t('Default list'),
      'uk-list-bullet' => t('Bullet list'),
      'uk-list-divider' => t('Divided list'),
      'uk-list-striped' => t('Striped list'),
    ),
  );
  $form['large_modifier'] = array(
    '#title' => t('Large modifier'),
    '#description' => t('Increase the spacing between list items.'),
    '#type' => 'checkbox',
    '#default_value' => $this->options['large_modifier'],
  );
}