1. 6.x-3.x docs/docs.php views_hooks
  2. 7.x-3.x views.api.php views_hooks

Hooks that can be implemented by other modules in order to implement the Views API.


./views.api.php, line 287
Describe hooks provided by the Views module.


Namesort descending Location Description
hook_field_views_data ./views.api.php Override the default data for a Field API field.
hook_field_views_data_alter ./views.api.php Alter the views data for a single Field API field.
hook_field_views_data_views_data_alter ./views.api.php Alter the views data on a per field basis.
hook_views_ajax_data_alter ./views.api.php Allows altering the commands which are used on a views AJAX request.
hook_views_api ./views.api.php Register View API information.
hook_views_data ./views.api.php Describes data tables (or the equivalent) to Views.
hook_views_data_alter ./views.api.php Alter table structure.
hook_views_default_views ./views.api.php Allows modules to provide their own views.
hook_views_default_views_alter ./views.api.php Alter default views defined by other modules.
hook_views_form_substitutions ./views.api.php This hook is called to get a list of placeholders and their substitutions.
hook_views_invalidate_cache ./views.api.php Allow modules to respond to the Views cache being invalidated.
hook_views_plugins ./views.api.php Describes plugins defined by the module.
hook_views_plugins_alter ./views.api.php Alter existing plugins data, defined by modules.
hook_views_post_build ./views.api.php This hook is called right after the build process.
hook_views_post_execute ./views.api.php This hook is called right after the execute process.
hook_views_post_render ./views.api.php Post process any rendered data.
hook_views_preview_info_alter ./views.api.php Alter the information box that (optionally) appears with a view preview.
hook_views_pre_build ./views.api.php Called after the display's pre_execute phase but before the build process.
hook_views_pre_execute ./views.api.php This hook is called right before the execute process.
hook_views_pre_render ./views.api.php This hook is called right before the render process.
hook_views_pre_view ./views.api.php Allows altering a view at the very beginning of views processing.
hook_views_query_alter ./views.api.php Alter the query before executing the query.
hook_views_query_substitutions ./views.api.php Performs replacements in the query before being performed.
hook_views_ui_display_top_links_alter ./views.api.php This hooks allows to alter the links at the top of the view edit form.
hook_views_view_delete ./views.api.php Allow modules to respond to a view being deleted or reverted.
hook_views_view_presave ./views.api.php Allow modules to alter a view prior to being saved.
hook_views_view_save ./views.api.php Allow modules to respond to a view being saved.


alex.designworks’s picture


Anonymous’s picture

Thanks for the execution order; this is a handy reference.

neerajsingh’s picture

Thanks @Alex, this sequence saved a lot of time..!!

UnsettlingTrend’s picture

... but, my god man, why can't more people/modules/maintainers do this!? THANK YOU!

elvis2’s picture

@alex.designworks - a BIG thanks for giving the order of execution!

bobojo’s picture

Another really helpful guide to hook execution order can be found in this presentation: http://colorado2011.drupalcamp.org/sites/default/files/slides/Using_View...

aaronbauman’s picture