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
JsCollection.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
20
namespace
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media
;
21
26
class
JsCollection
extends
AbstractCollection
27
{
28
protected
array
$path_storage
= [];
29
33
public
function
addItem
(
Js
$item): void
34
{
35
$basename = $this->
stripPath
($item->
getContent
());
36
if
(!array_key_exists($basename, $this->items)) {
37
$this->
storeItem
($item);
38
}
else
{
39
$existing = $this->items[$basename];
40
if
(($existing instanceof
Js
) && $existing->getBatch() > $item->
getBatch
()) {
41
$this->
storeItem
($item);
42
}
43
}
44
}
45
46
private
function
storeItem
(
47
js $item
48
): void {
49
$strip_path = $this->
stripPath
($item->getContent());
50
$this->items[$strip_path] = $item;
51
$this->path_storage[$strip_path] = $item->getBatch();
52
}
53
57
public
function
getItemsInOrderOfDelivery
(): array
58
{
59
$ordered = [];
60
foreach
($this->
getItems
() as
$js
) {
61
$ordered[
'pos_'
. (string) $js->getBatch()][] =
$js
;
62
}
63
ksort($ordered);
64
$ordered_all = [];
65
foreach
($ordered as $item) {
66
foreach
($item as $js) {
67
$ordered_all[] =
$js
;
68
}
69
}
70
71
return
$ordered_all;
72
}
73
}
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\JsCollection\addItem
addItem(Js $item)
Definition:
JsCollection.php:33
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractMediaWithPath\getContent
getContent()
Definition:
AbstractMediaWithPath.php:29
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\JsCollection\$path_storage
array $path_storage
Definition:
JsCollection.php:28
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractCollection
Class Js.
Definition:
AbstractCollection.php:29
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Js
Class Js.
Definition:
Js.php:26
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\JsCollection
Definition:
JsCollection.php:26
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Js\getBatch
getBatch()
Definition:
Js.php:55
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractCollection\stripPath
stripPath(string $path)
Definition:
AbstractCollection.php:71
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\JsCollection\getItemsInOrderOfDelivery
getItemsInOrderOfDelivery()
Definition:
JsCollection.php:57
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractCollection\getItems
getItems()
Definition:
AbstractCollection.php:54
ILIAS\GlobalScreen\Scope\Layout\MetaContent\MetaContent\$js
JsCollection $js
Definition:
MetaContent.php:46
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\JsCollection\storeItem
storeItem(js $item)
Definition:
JsCollection.php:46
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
AbstractCollection.php:21
src
GlobalScreen
Scope
Layout
MetaContent
Media
JsCollection.php
Generated on Sun Apr 6 2025 22:02:58 for ILIAS by
1.8.13 (using
Doxyfile
)