ILIAS
trunk Revision v11.0_alpha-1689-g66c127b4ae8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
class.ilOrgUnitOperationContextQueries.php
Go to the documentation of this file.
1
<?php
2
24
class
ilOrgUnitOperationContextQueries
25
{
26
protected
static
array
$instance_by_name
= array();
27
protected
static
ilOrgUnitOperationContextDBRepository
$contextRepo
;
28
29
protected
static
function
getContextRepo
()
30
{
31
if
(!isset(self::$contextRepo)) {
32
$dic
=
ilOrgUnitLocalDIC::dic
();
33
self::$contextRepo =
$dic
[
"repo.OperationContexts"
];
34
}
35
36
return
self::$contextRepo;
37
}
38
42
public
static
function
registerNewContext
(
string
$context_name, ?
string
$parent_context =
null
): void
43
{
44
$context
= self::getContextRepo()->get($context_name, $parent_context);
45
}
46
47
52
public
static
function
findByName
(
string
$context_name):
ilOrgUnitOperationContext
53
{
54
if
(!isset(self::$instance_by_name[$context_name])) {
55
$context
= self::getContextRepo()->find($context_name);
56
if
(!
$context
) {
57
throw
new
ilException
(
"Context not found"
);
58
}
59
self::$instance_by_name[$context_name] =
$context
;
60
}
61
62
return
self::$instance_by_name[$context_name];
63
}
64
69
public
static
function
findById
(
int
$id
):
ilOrgUnitOperationContext
70
{
71
return
self::getContextRepo()->getById($id);
72
}
73
77
public
static
function
findByRefId
(
int
$ref_id
):
ilOrgUnitOperationContext
78
{
79
$type_context =
ilObject2::_lookupType
($ref_id,
true
);
80
81
return
self::findByName($type_context);
82
}
83
87
public
static
function
findByObjId
(
int
$obj_id):
ilOrgUnitOperationContext
88
{
89
$type_context =
ilObject2::_lookupType
($obj_id,
false
);
90
91
return
self::findByName($type_context);
92
}
93
}
ilException
$context
$context
Definition:
webdav.php:31
ilOrgUnitOperationContextQueries\findByName
static findByName(string $context_name)
Definition:
class.ilOrgUnitOperationContextQueries.php:52
ilOrgUnitOperationContextQueries\findByObjId
static findByObjId(int $obj_id)
Definition:
class.ilOrgUnitOperationContextQueries.php:87
ilOrgUnitOperationContextQueries\getContextRepo
static getContextRepo()
Definition:
class.ilOrgUnitOperationContextQueries.php:29
ilOrgUnitOperationContextQueries
ilOrgUnitOperationContextQueries\findById
static findById(int $id)
Definition:
class.ilOrgUnitOperationContextQueries.php:69
ilOrgUnitOperationContextQueries\$instance_by_name
static array $instance_by_name
Definition:
class.ilOrgUnitOperationContextQueries.php:26
ilOrgUnitOperationContextQueries\registerNewContext
static registerNewContext(string $context_name, ?string $parent_context=null)
Definition:
class.ilOrgUnitOperationContextQueries.php:42
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:142
$ref_id
$ref_id
Definition:
ltiauth.php:65
ilOrgUnitOperationContextQueries\findByRefId
static findByRefId(int $ref_id)
Definition:
class.ilOrgUnitOperationContextQueries.php:77
ilOrgUnitLocalDIC\dic
static dic()
Definition:
class.ilOrgUnitLocalDIC.php:27
ilOrgUnitOperationContextDBRepository
Definition:
class.ilOrgUnitOperationContextDBRepository.php:21
ilOrgUnitOperationContextQueries\$contextRepo
static ilOrgUnitOperationContextDBRepository $contextRepo
Definition:
class.ilOrgUnitOperationContextQueries.php:27
ilOrgUnitOperationContext
$id
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition:
plugin.php:23
$dic
$dic
Definition:
result.php:31
ilObject\_lookupType
static _lookupType(int $id, bool $reference=false)
Definition:
class.ilObject.php:1084
components
ILIAS
OrgUnit
classes
Positions
Operation
class.ilOrgUnitOperationContextQueries.php
Generated on Wed Apr 2 2025 23:03:22 for ILIAS by
1.8.13 (using
Doxyfile
)