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}