init
This commit is contained in:
18
kirby/src/Form/Mixin/EmptyState.php
Normal file
18
kirby/src/Form/Mixin/EmptyState.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Kirby\Form\Mixin;
|
||||
|
||||
trait EmptyState
|
||||
{
|
||||
protected string|null $empty;
|
||||
|
||||
protected function setEmpty(string|array|null $empty = null): void
|
||||
{
|
||||
$this->empty = $this->i18n($empty);
|
||||
}
|
||||
|
||||
public function empty(): string|null
|
||||
{
|
||||
return $this->stringTemplate($this->empty);
|
||||
}
|
||||
}
|
||||
18
kirby/src/Form/Mixin/Max.php
Normal file
18
kirby/src/Form/Mixin/Max.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Kirby\Form\Mixin;
|
||||
|
||||
trait Max
|
||||
{
|
||||
protected int|null $max;
|
||||
|
||||
public function max(): int|null
|
||||
{
|
||||
return $this->max;
|
||||
}
|
||||
|
||||
protected function setMax(int $max = null)
|
||||
{
|
||||
$this->max = $max;
|
||||
}
|
||||
}
|
||||
18
kirby/src/Form/Mixin/Min.php
Normal file
18
kirby/src/Form/Mixin/Min.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Kirby\Form\Mixin;
|
||||
|
||||
trait Min
|
||||
{
|
||||
protected int|null $min;
|
||||
|
||||
public function min(): int|null
|
||||
{
|
||||
return $this->min;
|
||||
}
|
||||
|
||||
protected function setMin(int $min = null)
|
||||
{
|
||||
$this->min = $min;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user