You are here

private function CodeSnippet::getDefaultLanguages in CKEditor CodeSnippet 8

Return an array of languages.

This is used to set the list of checkboxes to be set as all TRUE when first configuring the plugin. Language names like C++ or C# don't quite work well with array_map for the checkboxes element since the value and key do not match up.

Return value

array Default programming languages.

1 call to CodeSnippet::getDefaultLanguages()
CodeSnippet::settingsForm in src/Plugin/CKEditorPlugin/CodeSnippet.php
Returns a settings form to configure this CKEditor plugin.

File

src/Plugin/CKEditorPlugin/CodeSnippet.php, line 135

Class

CodeSnippet
Defines the "codesnippet" plugin.

Namespace

Drupal\codesnippet\Plugin\CKEditorPlugin

Code

private function getDefaultLanguages() {
  $languages = array_keys($this
    ->getLanguages());
  return array_combine($languages, $languages);
}