3 namespace Drupal\views\Plugin\views\style;
5 use Drupal\Core\Form\FormStateInterface;
8 * The default style plugin for summaries.
10 * @ingroup views_style_plugins
13 * id = "unformatted_summary",
14 * title = @Translation("Unformatted"),
15 * help = @Translation("Displays the summary unformatted, with option for one after another or inline."),
16 * theme = "views_view_summary_unformatted",
17 * display_types = {"summary"}
20 class UnformattedSummary extends DefaultSummary {
22 protected function defineOptions() {
23 $options = parent::defineOptions();
24 $options['inline'] = ['default' => FALSE];
25 $options['separator'] = ['default' => ''];
29 public function buildOptionsForm(&$form, FormStateInterface $form_state) {
30 parent::buildOptionsForm($form, $form_state);
32 '#type' => 'checkbox',
33 '#default_value' => !empty($this->options['inline']),
34 '#title' => $this->t('Display items inline'),
36 $form['separator'] = [
37 '#type' => 'textfield',
38 '#title' => $this->t('Separator'),
39 '#default_value' => $this->options['separator'],