I'm trying to override some view by using the hook_views_pre_build hook. Following the documentation: https://api.drupal.org/api/drupal/core%21modules%21views%21views.api.php/function/hook_views_pre_build/8.1.x
My module is named "mymodule", I've got:
<?php
//... some code that works
// and my hook:
function mymodule_views_pre_build(&$view) {
var_dump("hello"); die();
}
And that has no effect at all. Trying other hooks works, for example "mymodule_preprocess_page" is ok.
I do a "drush cr" each time, I tried other hook as "mymodule_views_pre_exec" that has no effect. It seems that Drupal 8.1 doesn't execute hook_views_XXX
Anyone can help me to resolve this ?