You are here

function rb_views_views_pre_build in Rules Bonus Pack 7

Implements of hook_views_pre_execute().

Parameters

$view: The view object that is going to be executed.

File

./rb_views.module, line 20
Globally available functions for Rules' Views integration.

Code

function rb_views_views_pre_build($view) {

  // Get a light-weight and easy-to-handle representation of the view.
  $view_representation = rb_views_create_view_representation($view);

  // Call the Rules event, passing along the view representation.
  rules_invoke_event('rb_views_event_view_execute', $view_representation);

  // Update the original view according to changes in the representation.
  rb_view_update_real_view($view, $view_representation);
}