| @@ 88-101 (lines=14) @@ | ||
| 85 | /** |
|
| 86 | * {@inheritdoc} |
|
| 87 | */ |
|
| 88 | public function prepare_items() |
|
| 89 | { |
|
| 90 | $this->_column_headers = $this->get_column_info(); |
|
| 91 | ||
| 92 | $limit = $this->get_items_per_page('forms_per_page', 10); |
|
| 93 | $offset = $this->get_pagenum(); |
|
| 94 | $this->items = $this->storage->findAll($limit, $offset); |
|
| 95 | $total = count($this->items); |
|
| 96 | ||
| 97 | $this->set_pagination_args([ |
|
| 98 | 'total_items' => $total, |
|
| 99 | 'per_page' => $limit, |
|
| 100 | ]); |
|
| 101 | } |
|
| 102 | } |
|
| 103 | ||
| @@ 94-107 (lines=14) @@ | ||
| 91 | /** |
|
| 92 | * {@inheritdoc} |
|
| 93 | */ |
|
| 94 | public function prepare_items() |
|
| 95 | { |
|
| 96 | $this->_column_headers = $this->get_column_info(); |
|
| 97 | ||
| 98 | $limit = $this->get_items_per_page('logs_per_page', 10); |
|
| 99 | $offset = $this->get_pagenum(); |
|
| 100 | $this->items = $this->storage->query(['formType' => $this->formType], $limit, $offset); |
|
| 101 | $total = count($this->items); |
|
| 102 | ||
| 103 | $this->set_pagination_args([ |
|
| 104 | 'total_items' => $total, |
|
| 105 | 'per_page' => $limit, |
|
| 106 | ]); |
|
| 107 | } |
|
| 108 | ||
| 109 | /** |
|
| 110 | * Callback that customize the header of the table. |
|