Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Core / Plugin / PluginFormFactoryInterface.php
1 <?php
2
3 namespace Drupal\Core\Plugin;
4
5 /**
6  * Provides an interface for retrieving form objects for plugins.
7  *
8  * This allows a plugin to define multiple forms, in addition to the plugin
9  * itself providing a form. All forms, decoupled or self-contained, must
10  * implement \Drupal\Core\Plugin\PluginFormInterface. Decoupled forms can
11  * implement \Drupal\Component\Plugin\PluginAwareInterface in order to gain
12  * access to the plugin.
13  */
14 interface PluginFormFactoryInterface {
15
16   /**
17    * Creates a new form instance.
18    *
19    * @param \Drupal\Core\Plugin\PluginWithFormsInterface $plugin
20    *   The plugin the form is for.
21    * @param string $operation
22    *   The name of the operation to use, e.g., 'add' or 'edit'.
23    * @param string $fallback_operation
24    *   (optional) The name of the fallback operation to use.
25    *
26    * @return \Drupal\Core\Plugin\PluginFormInterface
27    *   A plugin form instance.
28    *
29    * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
30    */
31   public function createInstance(PluginWithFormsInterface $plugin, $operation, $fallback_operation = NULL);
32
33 }