You are here

protected function N1EDEcosystemCKEditorPlugin::addNumberToForm in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8

File

src/Plugin/N1EDEcosystemCKEditorPlugin.php, line 160

Class

N1EDEcosystemCKEditorPlugin
Defines plugin.

Namespace

Drupal\n1ed\Plugin

Code

protected function addNumberToForm(&$form, $settings, $param, $default) {
  $form[$param] = array(
    '#type' => 'textfield',
    '#title' => $param,
    '#title_display' => 'invisible',
    '#default_value' => $this
      ->getConfigParam($settings, $param, $default, 'number'),
    '#attributes' => array(
      'style' => 'display: none!important',
      'data-n1ed-eco-param-name' => $param,
      'data-n1ed-eco-param-type' => 'number',
      'data-n1ed-eco-param-default' => $default,
    ),
  );
}