Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

PluginWithFormsInterface.php

Namespace

Drupal\Core\Plugin

File

core/lib/Drupal/Core/Plugin/PluginWithFormsInterface.php

View source
<?php

namespace Drupal\Core\Plugin;

use Drupal\Component\Plugin\PluginInspectionInterface;

/**
 * Provides an interface for plugins which have forms.
 *
 * Plugin forms are embeddable forms referenced by the plugin annotation.
 * Used by plugin types which have a larger number of plugin-specific forms.
 */
interface PluginWithFormsInterface extends PluginInspectionInterface {
    
    /**
     * Gets the form class for the given operation.
     *
     * @param string $operation
     *   The name of the operation.
     *
     * @return string|null
     *   The form class if defined, NULL otherwise.
     */
    public function getFormClass($operation);
    
    /**
     * Gets whether the plugin has a form class for the given operation.
     *
     * @param string $operation
     *   The name of the operation.
     *
     * @return bool
     *   TRUE if the plugin has a form class for the given operation.
     */
    public function hasFormClass($operation);

}

Interfaces

Title Deprecated Summary
PluginWithFormsInterface Provides an interface for plugins which have forms.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal