public function WidgetBase::buildConfigurationForm in Entity Browser 8.2
Same name and namespace in other branches
- 8 src/WidgetBase.php \Drupal\entity_browser\WidgetBase::buildConfigurationForm()
Implements PluginFormInterface::buildConfigurationForm().
Overrides PluginConfigurationFormTrait::buildConfigurationForm
3 calls to WidgetBase::buildConfigurationForm()
- EntityForm::buildConfigurationForm in modules/
entity_form/ src/ Plugin/ EntityBrowser/ Widget/ EntityForm.php - Implements PluginFormInterface::buildConfigurationForm().
- Upload::buildConfigurationForm in src/
Plugin/ EntityBrowser/ Widget/ Upload.php - Implements PluginFormInterface::buildConfigurationForm().
- View::buildConfigurationForm in src/
Plugin/ EntityBrowser/ Widget/ View.php - Implements PluginFormInterface::buildConfigurationForm().
3 methods override WidgetBase::buildConfigurationForm()
- EntityForm::buildConfigurationForm in modules/
entity_form/ src/ Plugin/ EntityBrowser/ Widget/ EntityForm.php - Implements PluginFormInterface::buildConfigurationForm().
- Upload::buildConfigurationForm in src/
Plugin/ EntityBrowser/ Widget/ Upload.php - Implements PluginFormInterface::buildConfigurationForm().
- View::buildConfigurationForm in src/
Plugin/ EntityBrowser/ Widget/ View.php - Implements PluginFormInterface::buildConfigurationForm().
File
- src/
WidgetBase.php, line 209
Class
- WidgetBase
- Base class for widget plugins.
Namespace
Drupal\entity_browserCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form['submit_text'] = [
'#type' => 'textfield',
'#title' => $this
->t('Submit button text'),
'#default_value' => $this->configuration['submit_text'],
];
// Allow "auto_select" setting when auto_select is supported by widget.
if ($this
->getPluginDefinition()['auto_select']) {
$form['auto_select'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Automatically submit selection'),
'#default_value' => $this->configuration['auto_select'],
];
}
return $form;
}