You are here

function twig_field_codemirror_mode_info_alter in Twig Field 8

Implements hook_codemirror_mode_info_alter().

File

./twig_field.module, line 65
Primary module hooks for Twig field module.

Code

function twig_field_codemirror_mode_info_alter(array &$modes) {

  // Make sure that following modes are always loaded.
  foreach (TwigWidget::REQUIRED_CODEMIRROR_MODES as $mode) {
    $modes[$mode]['usage'][] = 'twig_field';
  }
}