public function Custom::buildOptionsForm in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/field/Custom.php \Drupal\views\Plugin\views\field\Custom::buildOptionsForm()
- 9 core/modules/views/src/Plugin/views/field/Custom.php \Drupal\views\Plugin\views\field\Custom::buildOptionsForm()
File
- core/
modules/ views/ src/ Plugin/ views/ field/ Custom.php, line 48
Class
- Custom
- A handler to provide a field that is completely custom by the administrator.
Namespace
Drupal\views\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
// Remove the checkbox
unset($form['alter']['alter_text']);
unset($form['alter']['text']['#states']);
unset($form['alter']['help']['#states']);
$form['#pre_render'][] = [
$this,
'preRenderCustomForm',
];
}