protected function N1EDEcosystemCKEditorPlugin::addBooleanToForm in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8
1 call to N1EDEcosystemCKEditorPlugin::addBooleanToForm()
- n1ed::addControlsToForm in src/
Plugin/ CKEditorPlugin/ n1ed.php - Adds controls to form using this class methods.
File
- src/
Plugin/ N1EDEcosystemCKEditorPlugin.php, line 176
Class
- N1EDEcosystemCKEditorPlugin
- Defines plugin.
Namespace
Drupal\n1ed\PluginCode
protected function addBooleanToForm(&$form, $settings, $param, $default) {
$form[$param] = array(
'#type' => 'textfield',
'#title' => $param,
'#title_display' => 'invisible',
'#default_value' => $this
->getConfigParam($settings, $param, $default, 'boolean') ? "true" : "false",
'#attributes' => array(
'style' => 'display: none!important',
'data-n1ed-eco-param-name' => $param,
'data-n1ed-eco-param-type' => 'boolean',
'data-n1ed-eco-param-default' => $default ? "true" : "false",
),
);
}