function HtmlList::defineOptions

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/style/HtmlList.php \Drupal\views\Plugin\views\style\HtmlList::defineOptions()
  2. 8.9.x core/modules/views/src/Plugin/views/style/HtmlList.php \Drupal\views\Plugin\views\style\HtmlList::defineOptions()
  3. 10 core/modules/views/src/Plugin/views/style/HtmlList.php \Drupal\views\Plugin\views\style\HtmlList::defineOptions()

Set default options.

Overrides StylePluginBase::defineOptions

File

core/modules/views/src/Plugin/views/style/HtmlList.php, line 38

Class

HtmlList
Style plugin to render each item in an ordered or unordered list.

Namespace

Drupal\views\Plugin\views\style

Code

protected function defineOptions() {
    $options = parent::defineOptions();
    $options['type'] = [
        'default' => 'ul',
    ];
    $options['class'] = [
        'default' => '',
    ];
    $options['wrapper_class'] = [
        'default' => 'item-list',
    ];
    return $options;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.