function PluginFormFactoryInterface::createInstance

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/PluginFormFactoryInterface.php \Drupal\Core\Plugin\PluginFormFactoryInterface::createInstance()
  2. 10 core/lib/Drupal/Core/Plugin/PluginFormFactoryInterface.php \Drupal\Core\Plugin\PluginFormFactoryInterface::createInstance()
  3. 11.x 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);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.