Refactor generic tables and page index classes #26

Merged
Roflin merged 9 commits from refactor-tables into master 2021-05-17 20:19:18 +02:00
2 changed files with 19 additions and 23 deletions
Showing only changes of commit af73f00701 - Show all commits

View File

@ -8,18 +8,14 @@
class GenericTable class GenericTable
{ {
protected $header = []; private $header = [];
protected $body = []; private $body = [];
protected $pageIndex = null; private $pageIndex = null;
protected $currentPage = 1; private $currentPage = 1;
protected $title; private $title;
protected $title_class; private $title_class;
protected $tableIsSortable = false; private $tableIsSortable = false;
protected $recordCount;
protected $needsPageIndex = false;
protected $current_page;
protected $num_pages;
public $form_above; public $form_above;
public $form_below; public $form_below;

View File

@ -8,19 +8,19 @@
class PageIndex class PageIndex
{ {
protected $base_url; private $base_url;
protected $current_page = 1; private $current_page = 1;
protected $index_class = 'pagination'; private $index_class = 'pagination';
protected $items_per_page = 0; private $items_per_page = 0;
private $linkBuilder; private $linkBuilder;
protected $needsPageIndex = false; private $needsPageIndex = false;
protected $num_pages = 1; private $num_pages = 1;
protected $page_index = []; private $page_index = [];
protected $page_slug = '%AMP%page=%PAGE%'; private $page_slug = '%AMP%page=%PAGE%';
protected $recordCount = 0; private $recordCount = 0;
protected $sort_direction = null; private $sort_direction = null;
protected $sort_order = null; private $sort_order = null;
protected $start = 0; private $start = 0;
public function __construct($options) public function __construct($options)
{ {