function views_megarow_get_row in Views Megarow 7
Page callback: Returns a view limited to a single row, used by the "megarow_refresh_parent" ajax command.
@todo This code forces the active display to have a base field argument. Perhaps try supporting a custom display only for refreshing, so that the user can use arguments for something else.
Parameters
$view_name: The machine name of the view to load.
$display: The display_id for the view.
$args: Arguments to be passed to the view, formatted in JSON.
1 string reference to 'views_megarow_get_row'
- views_megarow_menu in ./
views_megarow.module - Implement hook_menu().
File
- ./
views_megarow.module, line 97
Code
function views_megarow_get_row($view_name, $display, $args) {
$output = '';
$view = views_get_view($view_name);
if ($view) {
$output = $view
->preview($display, drupal_json_decode($args));
}
return $output;
}