Skip to content
Snippets Groups Projects
Unverified Commit 0bd9bf2d authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3087486 by AkashkumarOSL, kim.pepper, catch: Update docs in PagerManagerInterface

(cherry picked from commit fb4c658d)
parent 5358f24e
No related branches found
No related tags found
No related merge requests found
...@@ -49,8 +49,7 @@ interface PagerManagerInterface { ...@@ -49,8 +49,7 @@ interface PagerManagerInterface {
* that invokes an external datastore with an SQL-like syntax: * that invokes an external datastore with an SQL-like syntax:
* @code * @code
* // First find the total number of items and initialize the pager. * // First find the total number of items and initialize the pager.
* $where = "status = 1"; * $total = mymodule_select("SELECT COUNT(*) FROM data WHERE status = 1")->result();
* $total = mymodule_select("SELECT COUNT(*) FROM data " . $where)->result();
* $num_per_page = \Drupal::config('mymodule.settings')->get('num_per_page'); * $num_per_page = \Drupal::config('mymodule.settings')->get('num_per_page');
* $pager = \Drupal::service('pager.manager')->createPager($total, $num_per_page); * $pager = \Drupal::service('pager.manager')->createPager($total, $num_per_page);
* $page = $pager->getCurrentPage(); * $page = $pager->getCurrentPage();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment