Commit fb4c658d authored by alexpott's avatar alexpott

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

parent 98daa599
......@@ -43,8 +43,7 @@ interface PagerManagerInterface {
* that invokes an external datastore with an SQL-like syntax:
* @code
* // First find the total number of items and initialize the pager.
* $where = "status = 1";
* $total = mymodule_select("SELECT COUNT(*) FROM data " . $where)->result();
* $total = mymodule_select("SELECT COUNT(*) FROM data WHERE status = 1")->result();
* $num_per_page = \Drupal::config('mymodule.settings')->get('num_per_page');
* $pager = \Drupal::service('pager.manager')->createPager($total, $num_per_page);
* $page = $pager->getCurrentPage();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment