interface PluginWithFormsInterface

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/PluginWithFormsInterface.php \Drupal\Core\Plugin\PluginWithFormsInterface
  2. 8.9.x core/lib/Drupal/Core/Plugin/PluginWithFormsInterface.php \Drupal\Core\Plugin\PluginWithFormsInterface
  3. 10 core/lib/Drupal/Core/Plugin/PluginWithFormsInterface.php \Drupal\Core\Plugin\PluginWithFormsInterface

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.

Hierarchy

Expanded class hierarchy of PluginWithFormsInterface

All classes that implement PluginWithFormsInterface

10 files declare their use of PluginWithFormsInterface
BlockBase.php in core/lib/Drupal/Core/Block/BlockBase.php
BlockEntitySettingTrayForm.php in core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php
BlockForm.php in core/modules/block/src/BlockForm.php
BlockPluginHasSettingsTrayFormAccessCheck.php in core/modules/settings_tray/src/Access/BlockPluginHasSettingsTrayFormAccessCheck.php
BlockPluginHasSettingsTrayFormAccessCheckTest.php in core/modules/settings_tray/tests/src/Unit/Access/BlockPluginHasSettingsTrayFormAccessCheckTest.php

... See full list

File

core/lib/Drupal/Core/Plugin/PluginWithFormsInterface.php, line 13

Namespace

Drupal\Core\Plugin
View source
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);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 6
PluginInspectionInterface::getPluginId public function Gets the plugin ID of the plugin instance. 2
PluginWithFormsInterface::getFormClass public function Gets the form class for the given operation.
PluginWithFormsInterface::hasFormClass public function Gets whether the plugin has a form class for the given operation.

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