public function SectionId::buildOptionsForm in Workbench Access 8
Same name in this branch
- 8 src/Plugin/views/filter/SectionId.php \Drupal\workbench_access\Plugin\views\filter\SectionId::buildOptionsForm()
- 8 src/Plugin/views/field/SectionId.php \Drupal\workbench_access\Plugin\views\field\SectionId::buildOptionsForm()
Default options form that provides the label widget that all fields should have.
Overrides FieldPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ field/ SectionId.php, line 24
Class
- SectionId
- Field handler to present the section assigned to the node.
Namespace
Drupal\workbench_access\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['output_format'] = [
'#type' => 'select',
'#title' => $this
->t('Output format'),
'#options' => [
'label' => $this
->t('Section label'),
'id' => $this
->t('Section id'),
],
'#default_value' => $this->options['output_format'],
];
$form['make_link'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Link to Section entity'),
'#default_value' => $this->options['make_link'],
];
return $form;
}