How to pass variable to a views template?
Replace this, with your function

public static function mytheme_preprocess_views_view(&amp;$vars) {
  $vars['test'] = 'Filtertest';
  return $vars['test'] ;
}


Then use this short code on your twig view:

{{ test }}


or if wanna use it in something.php in your views:

dump(test )