19 declare(strict_types=1);
46 return $this->
refinery->custom()->transformation(
47 static function ($v): ?FiveStarRatingScale {
48 if(is_null($v) || $v instanceof FiveStarRatingScale) {
70 if(!
$value instanceof FiveStarRatingScale) {
83 if ($this->requirement_constraint !==
null) {
86 return $this->
refinery->custom()->constraint(
87 static fn($v) => $v instanceof FiveStarRatingScale && $v->value > 0,
94 return fn(
$id) =>
"$('#$id').on('input', function(event) { 95 il.UI.input.onFieldUpdate(event, '$id', $('#$id').val()); 97 il.UI.input.onFieldUpdate(event, '$id', $('#$id').val());";
102 $max = count(FiveStarRatingScale::cases()) - 1;
103 if($current_average < 0 || $current_average > $max) {
104 throw new \InvalidArgumentException(
'current_average must be between 0 and ' . $max);
106 $clone = clone $this;
FiveStarRatingScale
This is the scale for the Rating Input.
Interface Observer Contains several chained tasks and infos about them.
A constraint encodes some resrtictions on values.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)