1. 8.5.x core/modules/views/src/Plugin/views/style/UnformattedSummary.php
  2. 8.0.x core/modules/views/src/Plugin/views/style/UnformattedSummary.php
  3. 8.1.x core/modules/views/src/Plugin/views/style/UnformattedSummary.php
  4. 8.2.x core/modules/views/src/Plugin/views/style/UnformattedSummary.php
  5. 8.3.x core/modules/views/src/Plugin/views/style/UnformattedSummary.php
  6. 8.4.x core/modules/views/src/Plugin/views/style/UnformattedSummary.php
  7. 8.6.x core/modules/views/src/Plugin/views/style/UnformattedSummary.php

Namespace

Drupal\views\Plugin\views\style

File

core/modules/views/src/Plugin/views/style/UnformattedSummary.php
View source
<?php

namespace Drupal\views\Plugin\views\style;

use Drupal\Core\Form\FormStateInterface;

/**
 * The default style plugin for summaries.
 *
 * @ingroup views_style_plugins
 *
 * @ViewsStyle(
 *   id = "unformatted_summary",
 *   title = @Translation("Unformatted"),
 *   help = @Translation("Displays the summary unformatted, with option for one after another or inline."),
 *   theme = "views_view_summary_unformatted",
 *   display_types = {"summary"}
 * )
 */
class UnformattedSummary extends DefaultSummary {
  protected function defineOptions() {
    $options = parent::defineOptions();
    $options['inline'] = array(
      'default' => FALSE,
    );
    $options['separator'] = array(
      'default' => '',
    );
    return $options;
  }
  public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);
    $form['inline'] = array(
      '#type' => 'checkbox',
      '#default_value' => !empty($this->options['inline']),
      '#title' => $this
        ->t('Display items inline'),
    );
    $form['separator'] = array(
      '#type' => 'textfield',
      '#title' => $this
        ->t('Separator'),
      '#default_value' => $this->options['separator'],
    );
  }

}

Classes

Namesort descending Description
UnformattedSummary The default style plugin for summaries.