3 namespace Drupal\{{ machine_name }}\Plugin\views\style;
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\views\Plugin\views\style\StylePluginBase;
9 * {{ plugin_label }} style plugin.
12 * id = "{{ plugin_id }}",
13 * title = @Translation("{{ plugin_label }}"),
14 * help = @Translation("Foo style plugin help."),
15 * theme = "views_style_{{ plugin_id }}",
16 * display_types = {"normal"}
19 class {{ class }} extends StylePluginBase {
24 protected $usesRowPlugin = TRUE;
29 protected $usesRowClass = TRUE;
34 protected function defineOptions() {
35 $options = parent::defineOptions();
36 $options['wrapper_class'] = ['default' => 'item-list'];
43 public function buildOptionsForm(&$form, FormStateInterface $form_state) {
44 parent::buildOptionsForm($form, $form_state);
45 $form['wrapper_class'] = [
46 '#title' => $this->t('Wrapper class'),
47 '#description' => $this->t('The class to provide on the wrapper, outside rows.'),
48 '#type' => 'textfield',
49 '#default_value' => $this->options['wrapper_class'],