public function ViewsExposedForm::preprocess in Open Social 8.9
Same name and namespace in other branches
- 8 themes/socialbase/src/Plugin/Preprocess/ViewsExposedForm.php \Drupal\socialbase\Plugin\Preprocess\ViewsExposedForm::preprocess()
- 8.2 themes/socialbase/src/Plugin/Preprocess/ViewsExposedForm.php \Drupal\socialbase\Plugin\Preprocess\ViewsExposedForm::preprocess()
- 8.3 themes/socialbase/src/Plugin/Preprocess/ViewsExposedForm.php \Drupal\socialbase\Plugin\Preprocess\ViewsExposedForm::preprocess()
- 8.4 themes/socialbase/src/Plugin/Preprocess/ViewsExposedForm.php \Drupal\socialbase\Plugin\Preprocess\ViewsExposedForm::preprocess()
- 8.5 themes/socialbase/src/Plugin/Preprocess/ViewsExposedForm.php \Drupal\socialbase\Plugin\Preprocess\ViewsExposedForm::preprocess()
- 8.6 themes/socialbase/src/Plugin/Preprocess/ViewsExposedForm.php \Drupal\socialbase\Plugin\Preprocess\ViewsExposedForm::preprocess()
- 8.7 themes/socialbase/src/Plugin/Preprocess/ViewsExposedForm.php \Drupal\socialbase\Plugin\Preprocess\ViewsExposedForm::preprocess()
- 8.8 themes/socialbase/src/Plugin/Preprocess/ViewsExposedForm.php \Drupal\socialbase\Plugin\Preprocess\ViewsExposedForm::preprocess()
Preprocess theme hook variables.
Parameters
array $variables: The variables array, passed by reference (modify in place).
string $hook: The name of the theme hook.
array $info: The theme hook info array.
Overrides PreprocessBase::preprocess
File
- themes/
socialbase/ src/ Plugin/ Preprocess/ ViewsExposedForm.php, line 19
Class
- ViewsExposedForm
- Pre-processes variables for the "views_exposed_form" theme hook.
Namespace
Drupal\socialbase\Plugin\PreprocessCode
public function preprocess(array &$variables, $hook, array $info) {
parent::preprocess($variables, $hook, $info);
if (isset($variables['theme_hook_original']) && $variables['theme_hook_original'] === 'views_exposed_form') {
// Set variable to to read by SocialbaseContainer.
$variables['form']['actions']['#exposed_form'] = TRUE;
$variables['form']['actions']['submit']['#button_type'] = 'default';
$variables['form']['actions']['reset']['#button_type'] = 'flat';
}
}