ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ 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\ObjectStandardAdapter
Definition:
ObjectStandardAdapter.php:24
ILIAS\Repository\Deletion\ObjectStandardAdapter\getType
getType()
Definition:
ObjectStandardAdapter.php:47
ILIAS\Repository\Deletion\ObjectStandardAdapter\getTitle
getTitle()
Definition:
ObjectStandardAdapter.php:52
ILIAS\Repository\Deletion\ObjectStandardAdapter\$object
ilObject $object
Definition:
ObjectStandardAdapter.php:25
ILIAS\Repository\Deletion\ObjectStandardAdapter\getId
getId()
Definition:
ObjectStandardAdapter.php:43
ILIAS\Repository\Deletion\ObjectStandardAdapter\__construct
__construct(int $ref_id)
Definition:
ObjectStandardAdapter.php:27
ILIAS\Repository\Deletion\ObjectStandardAdapter\getRefId
getRefId()
Definition:
ObjectStandardAdapter.php:57
ILIAS\Repository\Deletion\ObjectStandardAdapter\getInstanceByRefId
getInstanceByRefId(int $ref_id)
Definition:
ObjectStandardAdapter.php:34
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
ilObject
Class ilObject Basic functions for all objects.
Definition:
class.ilObject.php:38
ILIAS\Repository\Deletion\ObjectInterface
Definition:
ObjectInterface.php:24
$ref_id
$ref_id
Definition:
ltiauth.php:66
ILIAS\Repository\Deletion
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
AlreadyDeletedException.php:21
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
components
ILIAS
Repository
Deletion
ObjectStandardAdapter.php
Generated on Sat Oct 18 2025 23:03:36 for ILIAS by
1.9.4 (using
Doxyfile
)