function views_refresh_ajax_command_refresh in Views Refresh 7
Creates a Drupal Ajax 'viewsRefresh' command.
Parameters
string $selector: A jQuery selector string for the root DOM element of the view.
int $first_page: Whether the first page must be loaded instead of the current page.
Return value
array An array suitable for use with the ajax_render() function.
File
- ./
views_refresh.module, line 54 - Views Refresh module.
Code
function views_refresh_ajax_command_refresh($selector, $first_page = FALSE) {
return array(
'command' => 'viewsRefresh',
'selector' => $selector,
'scroll' => 0,
'first' => intval($first_page),
);
}