ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
ObjectStandardAdapter.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Repository\Deletion
;
22
23
class
ObjectStandardAdapter
implements
ObjectInterface
24
{
25
protected
?
\ilObject
$object
= null;
26
27
public
function
__construct
(
int
$ref_id
)
28
{
29
if
($ref_id > 0) {
30
$this->
object
=
\ilObjectFactory::getInstanceByRefId
($ref_id,
false
);
31
}
32
}
33
34
public
function
getInstanceByRefId
(
int
$ref_id
): ?
ObjectInterface
35
{
36
$inst =
new
self
(
$ref_id
);
37
if
($inst->getRefId() ===
$ref_id
) {
38
return
$inst;
39
}
40
return
null;
41
}
42
43
public
function
getId
():
int
44
{
45
return
$this->
object
->getId();
46
}
47
public
function
getType
(): string
48
{
49
return
$this->
object
->getType();
50
}
51
52
public
function
getTitle
(): string
53
{
54
return
$this->
object
->getTitle();
55
}
56
57
public
function
getRefId
():
int
58
{
59
if
(is_null($this->
object
)) {
60
return
0;
61
}
62
return
$this->
object
->getRefId();
63
}
64
65
public
function
delete
():
void
66
{
67
$this->
object
->delete();
68
}
69
}
ILIAS\Repository\Deletion
Definition:
AlreadyDeletedException.php:21
ILIAS\Repository\Deletion\ObjectStandardAdapter\getType
getType()
Definition:
ObjectStandardAdapter.php:47
ilObject
Class ilObject Basic functions for all objects.
Definition:
class.ilObject.php:32
ILIAS\Repository\Deletion\ObjectInterface
Definition:
ObjectInterface.php:23
ILIAS\Repository\Deletion\ObjectStandardAdapter
Definition:
ObjectStandardAdapter.php:23
ILIAS\Repository\Deletion\ObjectStandardAdapter\getRefId
getRefId()
Definition:
ObjectStandardAdapter.php:57
ILIAS\Repository\Deletion\ObjectStandardAdapter\__construct
__construct(int $ref_id)
Definition:
ObjectStandardAdapter.php:27
$ref_id
$ref_id
Definition:
ltiauth.php:66
ilObjectFactory\getInstanceByRefId
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
Definition:
class.ilObjectFactory.php:141
ILIAS\Repository\Deletion\ObjectStandardAdapter\$object
ilObject $object
Definition:
ObjectStandardAdapter.php:25
ILIAS\Repository\Deletion\ObjectStandardAdapter\getInstanceByRefId
getInstanceByRefId(int $ref_id)
Definition:
ObjectStandardAdapter.php:34
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ILIAS\Repository\Deletion\ObjectStandardAdapter\getId
getId()
Definition:
ObjectStandardAdapter.php:43
ILIAS\Repository\Deletion\ObjectStandardAdapter\getTitle
getTitle()
Definition:
ObjectStandardAdapter.php:52
components
ILIAS
Repository
Deletion
ObjectStandardAdapter.php
Generated on Wed Sep 10 2025 15:16:12 for ILIAS by
1.8.13 (using
Doxyfile
)