Need json pagers infos in views rest_export Drupal 8 .Can any one help this .

===================================================
I can get pagers info at Views Datasource Module in Drupal 7.
like this :
// check if user wants nested arrays
$vars["rows"] = strlen($root_object) != 0 ? array($root_object => $objects) : $objects;
//DIY ADD BEGIN
global $pager_total, $pager_page_array, $pager_total_items, $pager_limits;
$vars['rows']['pager'] = array(
'pages' => $pager_total[0],
'page' => $pager_page_array[0],
'count' => intval($pager_total_items[0]),
'limit' => intval($pager_limits[0])
);
$vars["rows"]["pager"]=$vars["rows"]["pager"];
//print_r($vars['rows']['pager']);
/**
Array(
[pages] => 9
[page] => 2
[count] => 101
[limit] => 12
)
*/
//DIY ADD END

Comments

hubobbb created an issue. See original summary.

hubobbb’s picture

Title: How to get rest_export pagers with json data in views ? » How to add pager support to rest_export in views

Version: 8.3.6 » 8.3.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.3.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
cilefen’s picture

Status: Active » Closed (outdated)

I am closing this support request because there have been no recent comments.

The Drupal Core issue queue is not the ideal place for support requests. Consider other sources of support.