Files
Bastian Allgeier daf499e2e4 Upgrade to 4.6.0
2025-01-30 12:15:44 +01:00

29 lines
439 B
PHP

<?php
return [
'props' => [
/**
* Sets the maximum number of allowed entries in the section
*/
'max' => function (int|null $max = null) {
return $max;
}
],
'methods' => [
'isFull' => function () {
if ($this->max) {
return $this->total >= $this->max;
}
return false;
},
'validateMax' => function () {
if ($this->max && $this->total > $this->max) {
return false;
}
return true;
}
]
];