more work on tablelisting

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-02-25 09:52:35 +01:00
parent 5964c3b685
commit c2ec309a01
11 changed files with 336 additions and 237 deletions

View File

@@ -81,16 +81,23 @@ class Collection
public function has(string $column, string $class, string $parentKey = 'id', string $childKey = 'id', array $params = []): Collection
{
$this->has[] = [
'column' => $column,
'class' => $class,
'parentKey' => $parentKey,
'childKey' => $childKey,
'params' => $params
'column' => $column,
'class' => $class,
'parentKey' => $parentKey,
'childKey' => $childKey,
'params' => $params
];
return $this;
}
public function addParam(array $keyval): Collection
{
$this->params = array_merge($this->params, $keyval);
return $this;
}
public function withPagination(array $columns): Collection
{
// TODO: handle 'sortable' => true in $columns