function TestToolkit::buildConfigurationForm

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::buildConfigurationForm()
  2. 10 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::buildConfigurationForm()
  3. 11.x core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::buildConfigurationForm()

Overrides PluginFormInterface::buildConfigurationForm

File

core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php, line 92

Class

TestToolkit
Defines a Test toolkit for image manipulation within Drupal.

Namespace

Drupal\image_test\Plugin\ImageToolkit

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $this->logCall('settings', func_get_args());
    $form['test_parameter'] = [
        '#type' => 'number',
        '#title' => $this->t('Test toolkit parameter'),
        '#description' => $this->t('A toolkit parameter for testing purposes.'),
        '#min' => 0,
        '#max' => 100,
        '#default_value' => $this->configFactory
            ->getEditable('system.image.test_toolkit')
            ->get('test_parameter', FALSE),
    ];
    return $form;
}

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