ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ 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
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
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
q
r
s
t
u
v
w
x
z
+
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
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
JsCollection.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
namespace
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media
;
21
26
class
JsCollection
extends
AbstractCollection
27
{
31
protected
$path_storage
= [];
32
36
public
function
addItem
(
Js
$item) : void
37
{
38
$basename = $this->
stripPath
($item->
getContent
());
39
if
(!array_key_exists($basename, $this->items)) {
40
$this->
storeItem
($item);
41
}
else
{
42
$existing = $this->items[$basename];
43
if
(($existing instanceof
Js
) && $existing->getBatch() > $item->
getBatch
()) {
44
$this->
storeItem
($item);
45
}
46
}
47
}
48
49
private
function
storeItem
(
50
js $item
51
) : void {
52
$strip_path = $this->
stripPath
($item->getContent());
53
$this->items[$strip_path] = $item;
54
$this->path_storage[$strip_path] = $item->getBatch();
55
}
56
60
public
function
getItemsInOrderOfDelivery
() : array
61
{
62
$ordered = [];
63
foreach
($this->
getItems
() as
$js
) {
64
$ordered[
'pos_'
. (string) $js->getBatch()][] =
$js
;
65
}
66
ksort($ordered);
67
$ordered_all = [];
68
foreach
($ordered as $item) {
69
foreach
($item as $js) {
70
$ordered_all[] =
$js
;
71
}
72
}
73
74
return
$ordered_all;
75
}
76
}
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\JsCollection\addItem
addItem(Js $item)
Definition:
JsCollection.php:36
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractMediaWithPath\getContent
getContent()
Definition:
AbstractMediaWithPath.php:29
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\JsCollection\$path_storage
$path_storage
Definition:
JsCollection.php:31
ILIAS\GlobalScreen\Scope\Layout\MetaContent\MetaContent\$js
$js
Definition:
MetaContent.php:55
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Js\getBatch
getBatch()
Definition:
Js.php:61
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractCollection\stripPath
stripPath(string $path)
Definition:
AbstractCollection.php:74
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\JsCollection\getItemsInOrderOfDelivery
getItemsInOrderOfDelivery()
Definition:
JsCollection.php:60
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractCollection\getItems
getItems()
Definition:
AbstractCollection.php:57
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\JsCollection\storeItem
storeItem(js $item)
Definition:
JsCollection.php:49
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media
Definition:
AbstractCollection.php:21
src
GlobalScreen
Scope
Layout
MetaContent
Media
JsCollection.php
Generated on Mon Apr 7 2025 21:01:52 for ILIAS by
1.8.13 (using
Doxyfile
)