public function ViewsJsonField::buildOptionsForm in Views Json Source 8
Same name and namespace in other branches
- 1.x src/Plugin/views/field/ViewsJsonField.php \Drupal\views_json_source\Plugin\views\field\ViewsJsonField::buildOptionsForm()
Options form.
Overrides FieldPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ field/ ViewsJsonField.php, line 56
Class
- ViewsJsonField
- Base field handler for views_json_source.
Namespace
Drupal\views_json_source\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['key'] = [
'#title' => $this
->t('Key Chooser'),
'#description' => $this
->t('choose a key'),
'#type' => 'textfield',
'#default_value' => $this->options['key'],
'#required' => TRUE,
];
$form['trusted_html'] = [
'#title' => $this
->t('Trusted HTML'),
'#description' => $this
->t('This field is from a trusted source and contains raw HTML markup to render here. Use with caution.'),
'#type' => 'checkbox',
'#default_value' => $this->options['trusted_html'],
];
}