ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilADTExternalLinkFormBridge.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
6
12
class
ilADTExternalLinkFormBridge
extends
ilADTFormBridge
13
{
14
protected
ilLogger
$logger
;
15
16
public
function
__construct
(
ilADT
$a_adt)
17
{
18
global
$DIC
;
19
parent::__construct
($a_adt);
20
21
$this->
logger
= $DIC->logger()->amet();
22
}
23
29
protected
function
isValidADT
(
ilADT
$a_adt): bool
30
{
31
return
$a_adt instanceof
ilADTExternalLink
;
32
}
33
37
public
function
addToForm
(): void
38
{
39
$def = $this->
getADT
()->getCopyOfDefinition();
40
41
$both =
new
ilCombinationInputGUI
($this->
getTitle
(), $this->
getElementId
());
42
$this->
addBasicFieldProperties
($both, $def);
43
44
$title
=
new
ilTextInputGUI
(
''
, $this->
getElementId
() .
'_title'
);
45
$title
->setMaxLength(250);
46
$title
->setValue($this->
getADT
()->
getTitle
());
47
$both->addCombinationItem(
'title'
,
$title
, $this->
lng
->txt(
'title'
));
48
49
$url
=
new
ilTextInputGUI
(
''
, $this->
getElementId
() .
'_url'
);
50
$url
->setMaxLength(1000);
51
$url
->setValue($this->
getADT
()->getUrl());
52
$both->addCombinationItem(
'url'
,
$url
, $this->
lng
->txt(
'url'
));
53
54
$this->
addToParentElement
($both);
55
}
56
60
public
function
importFromPost
(): void
61
{
62
$this->
getADT
()->setUrl($this->
getForm
()->getInput($this->
getElementId
() .
'_url'
));
63
$this->
getADT
()->setTitle($this->
getForm
()->getInput($this->
getElementId
() .
'_title'
));
64
65
$combination = $this->
getForm
()->getItemByPostVar($this->
getElementId
());
66
if
(!$combination instanceof
ilCombinationInputGUI
) {
67
$this->
logger
->warning(
'Cannot find combination input gui'
);
68
return
;
69
}
70
71
$combination->getCombinationItem(
'url'
)->setValue($this->
getADT
()->getUrl());
72
$combination->getCombinationItem(
'title'
)->setValue($this->
getADT
()->
getTitle
());
73
}
74
}
ilLogger
ilADTFormBridge\addToParentElement
addToParentElement(ilFormPropertyGUI $a_field)
Definition:
class.ilADTFormBridge.php:185
ilADTFormBridge\getForm
getForm()
Definition:
class.ilADTFormBridge.php:58
ilADTFormBridge
ADT form bridge base class.
Definition:
class.ilADTFormBridge.php:12
ilADTExternalLinkFormBridge\importFromPost
importFromPost()
Import from post.
Definition:
class.ilADTExternalLinkFormBridge.php:60
ilADT
ADT base class.
Definition:
class.ilADT.php:11
ilADTExternalLinkFormBridge\$logger
ilLogger $logger
Definition:
class.ilADTExternalLinkFormBridge.php:14
ilADTFormBridge\addBasicFieldProperties
addBasicFieldProperties(ilFormPropertyGUI $a_field, ilADTDefinition $a_def)
Helper method to handle generic properties like setRequired(), setInfo()
Definition:
class.ilADTFormBridge.php:142
$DIC
global $DIC
Definition:
feed.php:28
ilADTFormBridge\getTitle
getTitle()
Definition:
class.ilADTFormBridge.php:82
ILIAS\Repository\lng
lng()
Definition:
trait.GlobalDICDomainServices.php:56
ilADTExternalLinkFormBridge\addToForm
addToForm()
Add element to form.
Definition:
class.ilADTExternalLinkFormBridge.php:37
ilADTFormBridge\getADT
getADT()
Definition:
class.ilADTFormBridge.php:48
ilADTExternalLinkFormBridge
external link form bridge
Definition:
class.ilADTExternalLinkFormBridge.php:12
ilADTExternalLinkFormBridge\isValidADT
isValidADT(ilADT $a_adt)
Is valid type.
Definition:
class.ilADTExternalLinkFormBridge.php:29
ilADTFormBridge\getElementId
getElementId()
Definition:
class.ilADTFormBridge.php:72
ilCombinationInputGUI
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilCombinationInputGUI.php:26
ilTextInputGUI
ilADTExternalLinkFormBridge\__construct
__construct(ilADT $a_adt)
Definition:
class.ilADTExternalLinkFormBridge.php:16
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:37
ILIAS\Repository\logger
logger()
Definition:
trait.GlobalDICDomainServices.php:66
$url
$url
Definition:
proxy_ylocal.php:28
ilADTFormBridge\$title
string $title
Definition:
class.ilADTFormBridge.php:21
ilADTExternalLink
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilADTExternalLink.php:21
Services
ADT
classes
Types
ExternalLink
class.ilADTExternalLinkFormBridge.php
Generated on Sun Apr 6 2025 22:01:56 for ILIAS by
1.8.13 (using
Doxyfile
)