Overrides \Drupal\views\Plugin\views\row\RowPluginBase::buildOptionsForm().
Overrides RowPluginBase::buildOptionsForm
public function buildOptionsForm(&$form, &$form_state) {
parent::buildOptionsForm($form, $form_state);
$form['field_options'] = array(
'#type' => 'table',
'#header' => array(
t('Field'),
t('Alias'),
t('Raw output'),
),
'#empty' => t('You have no fields. Add some to your view.'),
'#tree' => TRUE,
);
$options = $this->options['field_options'];
if ($fields = $this->view->display_handler
->getOption('fields')) {
foreach ($fields as $id => $field) {
$form['field_options'][$id]['field'] = array(
'#markup' => $id,
);
$form['field_options'][$id]['alias'] = array(
'#type' => 'textfield',
'#default_value' => isset($options[$id]['alias']) ? $options[$id]['alias'] : '',
'#element_validate' => array(
array(
$this,
'validateAliasName',
),
),
);
$form['field_options'][$id]['raw_output'] = array(
'#type' => 'checkbox',
'#default_value' => isset($options[$id]['raw_output']) ? $options[$id]['raw_output'] : '',
);
}
}
}