Skip to content

Instantly share code, notes, and snippets.

@dmsmidt
Last active February 27, 2017 08:23
Show Gist options
  • Save dmsmidt/320d05a0ae6ab73ae26b to your computer and use it in GitHub Desktop.
Save dmsmidt/320d05a0ae6ab73ae26b to your computer and use it in GitHub Desktop.
Drupal 7 views hooks in execution order.
<?php
/**
* Implements hook_views_pre_view().
*/
function hook_views_pre_view(&$view, &$display_id, &$args) {
$foo = 'bar';
}
/**
* Implements hook_views_pre_build().
*/
function hook_views_pre_build(&$view) {
$foo = 'bar';
}
/**
* Implements hook_views_post_build().
*/
function hook_views_post_build(&$view) {
$foo = 'bar';
}
/**
* Implements hook_views_pre_execute().
*/
function hook_views_pre_execute(&$view) {
$foo = 'bar';
}
/**
* Implements hook_views_post_execute().
*/
function hook_views_post_execute(&$view) {
$foo = 'bar';
}
/**
* Implements hook_views_pre_render().
*/
function hook_views_pre_render(&$view) {
$foo = 'bar';
}
/**
* Implements hook_views_post_render().
*/
function hook_views_post_render(&$view) {
$foo = 'bar';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment