19 declare(strict_types=1);
77 list($from, $until) = $v;
78 if ($from && $until) {
79 return [
'start' => $from,
'end' => $until,
'interval' => $from->diff($until)];
91 $txt_id =
'duration_end_must_not_be_earlier_than_start';
93 $is_ok =
function ($v) {
97 return $v[
'start'] <= $v[
'end'];
100 $from_before_until = $this->
refinery->custom()->constraint($is_ok,
$error);
109 $clone = clone $this;
111 $clone->applyFormat();
129 fn($input) => $input->withFormat($this->getFormat()),
139 $clone = clone $this;
140 $clone->min_date = $date;
151 fn($input) => $input->withMinValue($this->getMinValue()),
169 $clone = clone $this;
170 $clone->max_date = $date;
181 fn($inpt) => $inpt->withMaxValue($this->getMaxValue()),
199 $clone = clone $this;
200 $clone->with_time_only = $time_only;
211 fn($input) => $input->withTimeOnly($this->getTimeOnly()),
229 $clone = clone $this;
231 $clone->applyWithUseTime();
249 fn($input) => $input->withUseTime($this->getUseTime()),
259 $clone = clone $this;
260 $clone->timezone = $tz;
262 fn($input) => $input->withTimezone($tz),
289 if ($this->requirement_constraint !==
null) {
301 return fn(
$id) =>
"var combinedDuration = function() { 303 $('#$id').find('input').each(function() { 304 options.push($(this).val()); 306 return options.join(' - '); 308 $('#$id').on('input', function(event) { 309 il.UI.input.onFieldUpdate(event, '$id', combinedDuration()); 311 il.UI.input.onFieldUpdate(event, '$id', combinedDuration());";
316 $clone = clone $this;
318 $clone->inputs[0]->withLabel($start_label),
319 $clone->inputs[1]->withLabel($end_label)
Interface Observer Contains several chained tasks and infos about them.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
A constraint encodes some resrtictions on values.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
txt(string $a_topic, string $a_default_lang_fallback_mod="")
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)