Files
lichterei-web/kirby/config/sections/mixins/empty.php
Bastian Allgeier 01277f79f2 first version
2019-01-13 23:17:34 +01:00

29 lines
593 B
PHP
Executable File

<?php
return [
'props' => [
/**
* Sets the text for the empty state box
*/
'empty' => function (string $empty = null) {
return I18n::translate($empty);
}
],
'methods' => [
'isFull' => function () {
if ($this->max) {
return $this->total >= $this->max;
}
return false;
},
'validateMax' => function () {
if ($this->max && $this->max < $this->total) {
return false;
}
return true;
}
]
];