public function WidgetBase::defaultConfiguration in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/WidgetBase.php \Drupal\entity_browser\WidgetBase::defaultConfiguration()
Gets default configuration for this plugin.
Return value
array An associative array with the default configuration.
Overrides ConfigurableInterface::defaultConfiguration
6 calls to WidgetBase::defaultConfiguration()
- DummyWidget::defaultConfiguration in tests/
modules/ entity_browser_test/ src/ Plugin/ EntityBrowser/ Widget/ DummyWidget.php - Gets default configuration for this plugin.
- EntityForm::defaultConfiguration in modules/
entity_form/ src/ Plugin/ EntityBrowser/ Widget/ EntityForm.php - Gets default configuration for this plugin.
- Upload::defaultConfiguration in src/
Plugin/ EntityBrowser/ Widget/ Upload.php - Gets default configuration for this plugin.
- View::defaultConfiguration in src/
Plugin/ EntityBrowser/ Widget/ View.php - Gets default configuration for this plugin.
- WidgetBase::handleWidgetContext in src/
WidgetBase.php - Allow configuration overrides at runtime based on widget context passed to this widget from the Entity Browser element.
4 methods override WidgetBase::defaultConfiguration()
- DummyWidget::defaultConfiguration in tests/
modules/ entity_browser_test/ src/ Plugin/ EntityBrowser/ Widget/ DummyWidget.php - Gets default configuration for this plugin.
- EntityForm::defaultConfiguration in modules/
entity_form/ src/ Plugin/ EntityBrowser/ Widget/ EntityForm.php - Gets default configuration for this plugin.
- Upload::defaultConfiguration in src/
Plugin/ EntityBrowser/ Widget/ Upload.php - Gets default configuration for this plugin.
- View::defaultConfiguration in src/
Plugin/ EntityBrowser/ Widget/ View.php - Gets default configuration for this plugin.
File
- src/
WidgetBase.php, line 148
Class
- WidgetBase
- Base class for widget plugins.
Namespace
Drupal\entity_browserCode
public function defaultConfiguration() {
$defaultConfig = [
'submit_text' => $this
->t('Select entities'),
];
// If auto select is supported by Widget, append default configuration.
if ($this
->getPluginDefinition()['auto_select']) {
$defaultConfig['auto_select'] = FALSE;
}
return $defaultConfig;
}