You are here

public function PluginFormFactoryInterface::createInstance in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Plugin/PluginFormFactoryInterface.php \Drupal\Core\Plugin\PluginFormFactoryInterface::createInstance()

Creates a new form instance.

Parameters

\Drupal\Core\Plugin\PluginWithFormsInterface $plugin: The plugin the form is for.

string $operation: The name of the operation to use, e.g., 'add' or 'edit'.

string $fallback_operation: (optional) The name of the fallback operation to use.

Return value

\Drupal\Core\Plugin\PluginFormInterface A plugin form instance.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

1 method overrides PluginFormFactoryInterface::createInstance()
PluginFormFactory::createInstance in core/lib/Drupal/Core/Plugin/PluginFormFactory.php
Creates a new form instance.

File

core/lib/Drupal/Core/Plugin/PluginFormFactoryInterface.php, line 31

Class

PluginFormFactoryInterface
Provides an interface for retrieving form objects for plugins.

Namespace

Drupal\Core\Plugin

Code

public function createInstance(PluginWithFormsInterface $plugin, $operation, $fallback_operation = NULL);