class TestPluginWithForm

Test class for form.

Hierarchy

Expanded class hierarchy of TestPluginWithForm

File

core/tests/Drupal/Tests/Core/Theme/Icon/IconPackExtractorFormTest.php, line 98

Namespace

Drupal\Tests\Core\Theme\Icon
View source
class TestPluginWithForm implements PluginWithFormsInterface {
    
    /**
     * {@inheritdoc}
     */
    public function getPluginId() : string {
        return 'test';
    }
    
    /**
     * {@inheritdoc}
     */
    public function getPluginDefinition() : array {
        return [];
    }
    
    /**
     * {@inheritdoc}
     */
    public function hasFormClass($operation) : bool {
        return TRUE;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getFormClass($operation) : string {
        return 'form_class';
    }
    
    /**
     * {@inheritdoc}
     */
    public function buildConfigurationForm(array $form, FormStateInterface $form_state) : array {
        $form['plugin_build_form'] = 'plugin_build_form';
        return $form;
    }
    
    /**
     * {@inheritdoc}
     */
    public function validateConfigurationForm(array &$form, FormStateInterface $form_state) : void {
        $form['plugin_validate_form'] = 'plugin_validate_form';
    }
    
    /**
     * {@inheritdoc}
     */
    public function submitConfigurationForm(array &$form, FormStateInterface $form_state) : void {
        $form['plugin_submit_form'] = 'plugin_submit_form';
    }

}

Members

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

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