You are here

function shs_chosen_shs_class_definitions_alter in Simple hierarchical select 8

Same name and namespace in other branches
  1. 2.0.x modules/shs_chosen/shs_chosen.module \shs_chosen_shs_class_definitions_alter()

Implements hook_shs_class_definitions_alter().

File

modules/shs_chosen/shs_chosen.module, line 11
Main functions for the "Simple hierarchical select: Chosen" module.

Code

function shs_chosen_shs_class_definitions_alter(&$definitions, $context) {
  if (!isset($context['settings']['chosen_override']) || empty($context['settings']['chosen_settings'])) {
    return;
  }

  // Use custom classes for widget.
  $definitions['views']['app'] = 'Drupal.shs_chosen.ChosenAppView';
  $definitions['views']['widget'] = 'Drupal.shs_chosen.ChosenWidgetView';
}