Add addBottom function
Signed-off-by: David Arendsen <darendsen@gamepoint.com>
This commit is contained in:
parent
483e67a2e8
commit
9e2bde4217
5 changed files with 91 additions and 0 deletions
33
src/Functions/Bottom.php
Normal file
33
src/Functions/Bottom.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace Arendsen\FluxQueryBuilder\Functions;
|
||||
|
||||
use Arendsen\FluxQueryBuilder\Type\ArrayType;
|
||||
|
||||
class Bottom extends Base
|
||||
{
|
||||
/**
|
||||
* @var int $n
|
||||
*/
|
||||
private $n;
|
||||
|
||||
/**
|
||||
* @var array $columns
|
||||
*/
|
||||
private $columns;
|
||||
|
||||
public function __construct($n, array $columns = [])
|
||||
{
|
||||
$this->n = $n;
|
||||
$this->columns = $columns;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
$input = new ArrayType(array_filter([
|
||||
'n' => $this->n,
|
||||
'columns' => $this->columns ?: null,
|
||||
]));
|
||||
return '|> bottom(' . $input . ') ';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue