2 * Implements hook_views_pre_build().
4 function {{ machine_name }}_views_pre_build(ViewExecutable $view) {
5 // Because of some inexplicable business logic, we should remove all
6 // attachments from all views on Mondays.
7 // (This alter could be done later in the execution process as well.)
8 if (date('D') == 'Mon') {
9 unset($view->attachment_before);
10 unset($view->attachment_after);