protected function ViewsXMLBackendBase::navigateViewsPager in Views XML Backend 8
Navigate within the Views Pager.
1 call to ViewsXMLBackendBase::navigateViewsPager()
- ViewsXMLBackendPagingTest::testPagingViewsXMLBackend in src/
Tests/ ViewsXMLBackendPagingTest.php - Tests Views XML Backend View paging.
File
- src/
Tests/ ViewsXMLBackendBase.php, line 281 - Contains \Drupal\views_xml_backend\Tests\ViewsXMLBackendBase.
Class
- ViewsXMLBackendBase
- Provides supporting functions for testing the Views XML Backend module.
Namespace
Drupal\views_xml_backend\TestsCode
protected function navigateViewsPager($pager_path) {
$content = $this->content;
$drupal_settings = $this->drupalSettings;
$ajax_settings = array(
'wrapper' => 'views-preview-wrapper',
'method' => 'replaceWith',
);
$url = $this
->getAbsoluteUrl($pager_path);
$post = array(
'js' => 'true',
) + $this
->getAjaxPageStatePostData();
$result = Json::decode($this
->drupalPost($url, 'application/vnd.drupal-ajax', $post));
if (!empty($result)) {
$this
->drupalProcessAjaxResponse($content, $result, $ajax_settings, $drupal_settings);
}
}