function ViewsPhp::phpPostExecute in Views PHP 8
Same name in this branch
- 8 src/Plugin/views/filter/ViewsPhp.php \Drupal\views_php\Plugin\views\filter\ViewsPhp::phpPostExecute()
- 8 src/Plugin/views/sort/ViewsPhp.php \Drupal\views_php\Plugin\views\sort\ViewsPhp::phpPostExecute()
- 8 src/Plugin/views/field/ViewsPhp.php \Drupal\views_php\Plugin\views\field\ViewsPhp::phpPostExecute()
See also
views_php_views_post_execute()
File
- src/
Plugin/ views/ sort/ ViewsPhp.php, line 86 - Definition of Drupal\views_php\Plugin\views\sort\ViewsPhp.
Class
- ViewsPhp
- A handler to sort a view using PHP defined by the administrator.
Namespace
Drupal\views_php\Plugin\views\sortCode
function phpPostExecute() {
if (!empty($this->options['php_sort']) && $this->view->style_plugin
->buildSort()) {
$this->php_sort_function = create_function('$view, $handler, &$static, $row1, $row2', $this->options['php_sort'] . ';');
ob_start();
usort($this->view->result, array(
$this,
'phpSort',
));
ob_end_clean();
}
}