drupal 9 remove field from view

Solutions on MaxInterview for drupal 9 remove field from view by the best coders in the world

showing results for - "drupal 9 remove field from view"
Kevin
22 Mar 2017
1// use this hook to remove fields because this fires before the
2// query, but after the display is loaded.  therefore, it's a simple
3// field unset.  dump $view->getDisplay() to see what's loaded.
4
5function mymod_views_pre_build(ViewExecutable $view) {
6	unset($view->field['name']);
7}
similar questions
queries leading to this page
drupal 9 remove field from view