You are here

function views_php_views_post_execute in Views PHP 8

Same name and namespace in other branches
  1. 6 views_php.module \views_php_views_post_execute()
  2. 7 views_php.module \views_php_views_post_execute()

Implements hook_views_post_execute().

File

./views_php.module, line 173
Allows to use PHP in views.

Code

function views_php_views_post_execute(ViewExecutable $view) {
  if (!empty($view->views_php)) {
    foreach (array(
      /*'argument',*/
      'field',
      'filter',
      'sort',
    ) as $type) {
      foreach ($view->{$type} as $id => $handler) {
        if (is_callable(array(
          $handler,
          'phpPostExecute',
        ))) {
          $handler
            ->phpPostExecute();
        }
      }
    }
  }
}