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