UnformattedSummary.php in Drupal 10
File
core/modules/views/src/Plugin/views/style/UnformattedSummary.php
View source
<?php
namespace Drupal\views\Plugin\views\style;
use Drupal\Core\Form\FormStateInterface;
class UnformattedSummary extends DefaultSummary {
protected function defineOptions() {
$options = parent::defineOptions();
$options['inline'] = [
'default' => FALSE,
];
$options['separator'] = [
'default' => '',
];
return $options;
}
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['inline'] = [
'#type' => 'checkbox',
'#default_value' => !empty($this->options['inline']),
'#title' => $this
->t('Display items inline'),
];
$form['separator'] = [
'#type' => 'textfield',
'#title' => $this
->t('Separator'),
'#default_value' => $this->options['separator'],
];
}
}