public function HandlerBase::buildOptionsForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/HandlerBase.php \Drupal\views\Plugin\views\HandlerBase::buildOptionsForm()
Provide a form to edit options for this plugin.
Overrides PluginBase::buildOptionsForm
6 calls to HandlerBase::buildOptionsForm()
- AreaPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ area/ AreaPluginBase.php - Provide a form to edit options for this plugin.
- ArgumentPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ argument/ ArgumentPluginBase.php - Provide a form to edit options for this plugin.
- FieldPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ field/ FieldPluginBase.php - Default options form that provides the label widget that all fields should have.
- FilterPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ filter/ FilterPluginBase.php - Provide the basic form which calls through to subforms. If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.
- RelationshipPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ relationship/ RelationshipPluginBase.php - Provide a form to edit options for this plugin.
6 methods override HandlerBase::buildOptionsForm()
- AreaPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ area/ AreaPluginBase.php - Provide a form to edit options for this plugin.
- ArgumentPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ argument/ ArgumentPluginBase.php - Provide a form to edit options for this plugin.
- FieldPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ field/ FieldPluginBase.php - Default options form that provides the label widget that all fields should have.
- FilterPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ filter/ FilterPluginBase.php - Provide the basic form which calls through to subforms. If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.
- RelationshipPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ relationship/ RelationshipPluginBase.php - Provide a form to edit options for this plugin.
File
- core/
modules/ views/ src/ Plugin/ views/ HandlerBase.php, line 274 - Contains \Drupal\views\Plugin\views\HandlerBase.
Class
- HandlerBase
- Base class for Views handler plugins.
Namespace
Drupal\views\Plugin\viewsCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
// Some form elements belong in a fieldset for presentation, but can't
// be moved into one because of the $form_state->getValues() hierarchy. Those
// elements can add a #fieldset => 'fieldset_name' property, and they'll
// be moved to their fieldset during pre_render.
$form['#pre_render'][] = array(
get_class($this),
'preRenderAddFieldsetMarkup',
);
parent::buildOptionsForm($form, $form_state);
$form['fieldsets'] = array(
'#type' => 'value',
'#value' => array(
'more',
'admin_label',
),
);
$form['admin_label'] = array(
'#type' => 'details',
'#title' => $this
->t('Administrative title'),
'#weight' => 150,
);
$form['admin_label']['admin_label'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Administrative title'),
'#description' => $this
->t('This title will be displayed on the views edit page instead of the default one. This might be useful if you have the same item twice.'),
'#default_value' => $this->options['admin_label'],
'#parents' => array(
'options',
'admin_label',
),
);
// This form is long and messy enough that the "Administrative title" option
// belongs in "Administrative title" fieldset at the bottom of the form.
$form['more'] = array(
'#type' => 'details',
'#title' => $this
->t('More'),
'#weight' => 200,
'#optional' => TRUE,
);
// Allow to alter the default values brought into the form.
// @todo Do we really want to keep this hook.
$this
->getModuleHandler()
->alter('views_handler_options', $this->options, $this->view);
}