function views_php_views_pre_execute in Views PHP 6
Same name and namespace in other branches
- 8 views_php.module \views_php_views_pre_execute()
- 7.2 views_php.module \views_php_views_pre_execute()
- 7 views_php.module \views_php_views_pre_execute()
Implements hook_views_pre_execute().
File
- ./
views_php.module, line 129 - Allows to use PHP in views.
Code
function views_php_views_pre_execute($view) {
foreach (array(
/*'argument',*/
'field',
'filter',
'sort',
) as $type) {
foreach ($view->{$type} as $id => $handler) {
if (is_callable(array(
$handler,
'php_pre_execute',
))) {
$handler
->php_pre_execute();
}
}
}
if (!empty($view->use_php_pager)) {
$view->php_pager = new views_php_pager_helper($view);
}
}