Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Core / Plugin / PluginWithFormsInterface.php
1 <?php
2
3 namespace Drupal\Core\Plugin;
4
5 use Drupal\Component\Plugin\PluginInspectionInterface;
6
7 /**
8  * Provides an interface for plugins which have forms.
9  *
10  * Plugin forms are embeddable forms referenced by the plugin annotation.
11  * Used by plugin types which have a larger number of plugin-specific forms.
12  */
13 interface PluginWithFormsInterface extends PluginInspectionInterface {
14
15   /**
16    * Gets the form class for the given operation.
17    *
18    * @param string $operation
19    *   The name of the operation.
20    *
21    * @return string|null
22    *   The form class if defined, NULL otherwise.
23    */
24   public function getFormClass($operation);
25
26   /**
27    * Gets whether the plugin has a form class for the given operation.
28    *
29    * @param string $operation
30    *   The name of the operation.
31    *
32    * @return bool
33    *   TRUE if the plugin has a form class for the given operation.
34    */
35   public function hasFormClass($operation);
36
37 }