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
FormInputNameSource.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
21
namespace
ILIAS\UI\Implementation\Component\Input
;
22
29
class
FormInputNameSource
implements
NameSource
30
{
31
private
int
$count
= 0;
32
private
array
$used_names
= [];
33
37
public
function
getNewName
(): string
38
{
39
return
'input_'
. $this->count++;
40
}
41
42
public
function
getNewDedicatedName
(
string
$dedicated_name): string
43
{
44
if
($dedicated_name ==
'input'
) {
45
return
$this->
getNewName
();
46
}
47
if
(in_array($dedicated_name, $this->used_names)) {
48
return
$dedicated_name .
'_'
. $this->count++;
49
}
else
{
50
$this->used_names[] = $dedicated_name;
51
return
$dedicated_name;
52
}
53
}
54
}
ILIAS\UI\Implementation\Component\Input\FormInputNameSource\getNewName
getNewName()
Definition:
FormInputNameSource.php:37
ILIAS\UI\Implementation\Component\Input\FormInputNameSource
FormInputNameSource is responsible for generating continuous form input names.
Definition:
FormInputNameSource.php:29
ILIAS\UI\Implementation\Component\Input\FormInputNameSource\getNewDedicatedName
getNewDedicatedName(string $dedicated_name)
Definition:
FormInputNameSource.php:42
ILIAS\UI\Implementation\Component\Input\FormInputNameSource\$count
int $count
Definition:
FormInputNameSource.php:31
ILIAS\UI\Implementation\Component\Input\NameSource
Describes a source for input names.
Definition:
NameSource.php:26
ILIAS\UI\Implementation\Component\Input
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
ArrayInputData.php:21
ILIAS\UI\Implementation\Component\Input\FormInputNameSource\$used_names
array $used_names
Definition:
FormInputNameSource.php:32
src
UI
Implementation
Component
Input
FormInputNameSource.php
Generated on Tue Apr 1 2025 22:02:50 for ILIAS by
1.8.13 (using
Doxyfile
)