Loading social_course.module +10 −1 Original line number Diff line number Diff line Loading @@ -901,10 +901,19 @@ function social_course_social_group_hide_types_alter(array &$hidden_types): void * Implements hook_form_FORM_ID_alter(). */ function social_course_form_views_exposed_form_alter(array &$form, FormStateInterface $form_state): void { if ($form_state->get('view')->id() === 'search_content') { $view_id = $form_state->get('view')->id(); if ($view_id === 'search_content') { foreach (['course_article', 'course_section', 'course_video'] as $type) { unset($form['type']['#options'][$type]); } return; } if ($view_id === 'newest_groups') { foreach (['course_advanced', 'course_basic'] as $type) { unset($form['type']['#options'][$type]); } } } Loading Loading
social_course.module +10 −1 Original line number Diff line number Diff line Loading @@ -901,10 +901,19 @@ function social_course_social_group_hide_types_alter(array &$hidden_types): void * Implements hook_form_FORM_ID_alter(). */ function social_course_form_views_exposed_form_alter(array &$form, FormStateInterface $form_state): void { if ($form_state->get('view')->id() === 'search_content') { $view_id = $form_state->get('view')->id(); if ($view_id === 'search_content') { foreach (['course_article', 'course_section', 'course_video'] as $type) { unset($form['type']['#options'][$type]); } return; } if ($view_id === 'newest_groups') { foreach (['course_advanced', 'course_basic'] as $type) { unset($form['type']['#options'][$type]); } } } Loading