function IconExtractorSettingsForm::buildBooleanForm

Build Drupal form for a boolean setting to a checkbox.

Parameters

string $setting_id: The setting id from the icon pack definition.

array $setting: The settings from the icon pack definition.

array $saved_values: The default saved values if any.

Return value

array The form API generated for enum as checkbox.

File

core/lib/Drupal/Core/Theme/Icon/IconExtractorSettingsForm.php, line 181

Class

IconExtractorSettingsForm
Handle icon extractor settings form conversion from YAML to Drupal Form API.

Namespace

Drupal\Core\Theme\Icon

Code

protected static function buildBooleanForm(string $setting_id, array $setting, array $saved_values) : array {
    $form = self::initSettingForm($setting_id, $setting, $saved_values);
    $form['#type'] = 'checkbox';
    return $form;
}

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