public static function WidgetBase::create in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::create()
- 9 core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::create()
Creates an instance of the plugin.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the plugin.
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
Return value
static Returns an instance of this plugin.
Overrides ContainerFactoryPluginInterface::create
5 methods override WidgetBase::create()
- DateRangeDefaultWidget::create in core/
modules/ datetime_range/ src/ Plugin/ Field/ FieldWidget/ DateRangeDefaultWidget.php - Creates an instance of the plugin.
- DateTimeDefaultWidget::create in core/
modules/ datetime/ src/ Plugin/ Field/ FieldWidget/ DateTimeDefaultWidget.php - Creates an instance of the plugin.
- FileWidget::create in core/
modules/ file/ src/ Plugin/ Field/ FieldWidget/ FileWidget.php - Creates an instance of the plugin.
- MediaLibraryWidget::create in core/
modules/ media_library/ src/ Plugin/ Field/ FieldWidget/ MediaLibraryWidget.php - Creates an instance of the plugin.
- ModerationStateWidget::create in core/
modules/ content_moderation/ src/ Plugin/ Field/ FieldWidget/ ModerationStateWidget.php - Creates an instance of the plugin.
File
- core/
lib/ Drupal/ Core/ Field/ WidgetBase.php, line 60
Class
- WidgetBase
- Base class for 'Field widget' plugin implementations.
Namespace
Drupal\Core\FieldCode
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($plugin_id, $plugin_definition, $configuration['field_definition'], $configuration['settings'], $configuration['third_party_settings']);
}