19 declare(strict_types=1);
32 class Link extends Group implements C\Input\Field\Link
54 $txt_id =
'label_cannot_be_empty_if_url_is_set';
56 $is_ok =
function ($v) {
57 list($label,
$url) = $v;
59 (is_null($label) || $label ===
'') &&
62 !is_null($label) && !is_null(
$url)
64 && is_a(
$url, URI::class)
68 $label_is_set_for_url = $this->
refinery->custom()->constraint($is_ok,
$error);
76 list($label,
$url) = $v;
80 return $this->data_factory->link($label ??
"",
$url);
99 if ($this->requirement_constraint !==
null) {
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
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...
__construct(Container $dic, ilPlugin $plugin)