ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Repository\Deletion\ObjectStandardAdapter Class Reference
+ Inheritance diagram for ILIAS\Repository\Deletion\ObjectStandardAdapter:
+ Collaboration diagram for ILIAS\Repository\Deletion\ObjectStandardAdapter:

Public Member Functions

 __construct (int $ref_id)
 
 getInstanceByRefId (int $ref_id)
 
 getId ()
 
 getType ()
 
 getTitle ()
 
 getRefId ()
 
 delete ()
 
 getInstanceByRefId (int $ref_id)
 
 delete ()
 
 getId ()
 
 getType ()
 
 getTitle ()
 
 getRefId ()
 

Protected Attributes

ilObject $object = null
 

Detailed Description

Definition at line 23 of file ObjectStandardAdapter.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Repository\Deletion\ObjectStandardAdapter::__construct ( int  $ref_id)

Definition at line 27 of file ObjectStandardAdapter.php.

28 {
29 if ($ref_id > 0) {
30 $this->object = \ilObjectFactory::getInstanceByRefId($ref_id, false);
31 }
32 }
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
$ref_id
Definition: ltiauth.php:66

References $ref_id, and ilObjectFactory\getInstanceByRefId().

+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ILIAS\Repository\Deletion\ObjectStandardAdapter::delete ( )

Implements ILIAS\Repository\Deletion\ObjectInterface.

Definition at line 65 of file ObjectStandardAdapter.php.

65 : void
66 {
67 $this->object->delete();
68 }

◆ getId()

ILIAS\Repository\Deletion\ObjectStandardAdapter::getId ( )

Implements ILIAS\Repository\Deletion\ObjectInterface.

Definition at line 43 of file ObjectStandardAdapter.php.

43 : int
44 {
45 return $this->object->getId();
46 }

◆ getInstanceByRefId()

ILIAS\Repository\Deletion\ObjectStandardAdapter::getInstanceByRefId ( int  $ref_id)

Implements ILIAS\Repository\Deletion\ObjectInterface.

Definition at line 34 of file ObjectStandardAdapter.php.

34 : ?ObjectInterface
35 {
36 $inst = new self($ref_id);
37 if ($inst->getRefId() === $ref_id) {
38 return $inst;
39 }
40 return null;
41 }

References $ref_id.

◆ getRefId()

ILIAS\Repository\Deletion\ObjectStandardAdapter::getRefId ( )

Implements ILIAS\Repository\Deletion\ObjectInterface.

Definition at line 57 of file ObjectStandardAdapter.php.

57 : int
58 {
59 if (is_null($this->object)) {
60 return 0;
61 }
62 return $this->object->getRefId();
63 }

◆ getTitle()

ILIAS\Repository\Deletion\ObjectStandardAdapter::getTitle ( )

Implements ILIAS\Repository\Deletion\ObjectInterface.

Definition at line 52 of file ObjectStandardAdapter.php.

52 : string
53 {
54 return $this->object->getTitle();
55 }

◆ getType()

ILIAS\Repository\Deletion\ObjectStandardAdapter::getType ( )

Implements ILIAS\Repository\Deletion\ObjectInterface.

Definition at line 47 of file ObjectStandardAdapter.php.

47 : string
48 {
49 return $this->object->getType();
50 }

Field Documentation

◆ $object

ilObject ILIAS\Repository\Deletion\ObjectStandardAdapter::$object = null
protected

Definition at line 25 of file ObjectStandardAdapter.php.


The documentation for this class was generated from the following file: