Loading modules/social_features/social_tagging/social_tagging.info.yml +1 −0 Original line number Diff line number Diff line Loading @@ -8,3 +8,4 @@ dependencies: - drupal:taxonomy - social:social_core - social:social_search - select2:select2 modules/social_features/social_tagging/social_tagging.module +13 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ use Drupal\taxonomy\Entity\Term; use Drupal\Core\Database\Database; use Drupal\views\Plugin\views\query\QueryPluginBase; use Drupal\views\ViewExecutable; use Drupal\select2\Element\Select2; /** * Implements hook_help(). Loading Loading @@ -522,6 +523,18 @@ function social_tagging_form_views_exposed_form_alter(&$form, FormStateInterface $form[$label]['#type'] = 'select2'; $form[$label]['#size'] = NULL; if (isset($form[$label]['#context']['#plugin_type']) && $form[$label]['#context']['#plugin_type'] === 'bef') { $form[$label]['#select2'] = []; $form[$label]['#process'] = [ [Select2::class, 'processSelect'], ]; $form[$label]['#pre_render'] = [ [Select2::class, 'preRenderSelect'], [Select2::class, 'preRenderAutocomplete'], [Select2::class, 'preRenderOverwrites'], ]; } /** @var \Symfony\Component\HttpFoundation\ParameterBag $query */ $query = \Drupal::request()->query; if ($query->has($label)) { Loading Loading
modules/social_features/social_tagging/social_tagging.info.yml +1 −0 Original line number Diff line number Diff line Loading @@ -8,3 +8,4 @@ dependencies: - drupal:taxonomy - social:social_core - social:social_search - select2:select2
modules/social_features/social_tagging/social_tagging.module +13 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ use Drupal\taxonomy\Entity\Term; use Drupal\Core\Database\Database; use Drupal\views\Plugin\views\query\QueryPluginBase; use Drupal\views\ViewExecutable; use Drupal\select2\Element\Select2; /** * Implements hook_help(). Loading Loading @@ -522,6 +523,18 @@ function social_tagging_form_views_exposed_form_alter(&$form, FormStateInterface $form[$label]['#type'] = 'select2'; $form[$label]['#size'] = NULL; if (isset($form[$label]['#context']['#plugin_type']) && $form[$label]['#context']['#plugin_type'] === 'bef') { $form[$label]['#select2'] = []; $form[$label]['#process'] = [ [Select2::class, 'processSelect'], ]; $form[$label]['#pre_render'] = [ [Select2::class, 'preRenderSelect'], [Select2::class, 'preRenderAutocomplete'], [Select2::class, 'preRenderOverwrites'], ]; } /** @var \Symfony\Component\HttpFoundation\ParameterBag $query */ $query = \Drupal::request()->query; if ($query->has($label)) { Loading