You are here

public function FormWidgetManagerInterface::createInstance in Typed Data API enhancements 8

Creates a form widget plugin instance.

Parameters

string $plugin_id: The ID of the plugin being instantiated; i.e., the filter machine name.

array $configuration: An array of configuration relevant to the plugin instance. As this plugin is not configurable, this is unused and should stay empty.

Return value

\Drupal\typed_data\Widget\FormWidgetInterface A fully configured plugin instance.

Throws

\Drupal\Component\Plugin\Exception\PluginException If the instance cannot be created, such as if the ID is invalid.

Overrides FactoryInterface::createInstance

File

src/Widget/FormWidgetManagerInterface.php, line 29

Class

FormWidgetManagerInterface
Interface for the form widget manager.

Namespace

Drupal\typed_data\Widget

Code

public function createInstance($plugin_id, array $configuration = []);