views_sort_expression.module in Views Sort Expression 7
Same filename and directory in other branches
File
views_sort_expression.moduleView source
<?php
/**
* Implements of hook_views_api().
*/
function views_sort_expression_views_api() {
return array(
'api' => 3,
'path' => drupal_get_path('module', 'views_sort_expression') . '/views',
);
}
/**
* Implements hook_views_post_build().
*
* Remove views_sort_expression from group by if it was configured as a group by
* manually
*
*/
function views_sort_expression_views_post_build(&$view) {
foreach ($view->sort as $handler) {
if ($handler instanceof views_sort_expression_handler) {
if ($handler->options['aggregate']) {
$alias = $handler->real_field . '_' . $handler->position;
$group_by =& $view->build_info['query']
->getGroupBy();
unset($group_by[$alias]);
}
}
}
}
Functions
Name | Description |
---|---|
views_sort_expression_views_api | Implements of hook_views_api(). |
views_sort_expression_views_post_build | Implements hook_views_post_build(). |