PluginWithFormsInterface.php 929 B

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