ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\components\Dashboard\Block\BlockDTO Class Reference
+ Collaboration diagram for ILIAS\components\Dashboard\Block\BlockDTO:

Public Member Functions

 __construct (private string $type, private int $ref_id, private int $obj_id, private string $title, private string $description, private ?ilDateTime $startDate=null, private ?ilDateTime $endDate=null, private array $additional_data=[])
 
 getType ()
 
 setType (string $type)
 
 getRefId ()
 
 setRefId (int $ref_id)
 
 getObjId ()
 
 setObjId (int $obj_id)
 
 getTitle ()
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getStartDate ()
 
 setStartDate (?ilDateTime $startDate)
 
 getEndDate ()
 
 setEndDate (?ilDateTime $endDate)
 
 hasNotStarted ()
 
 hasEnded ()
 
 isRunning ()
 
 isDated ()
 
 getAdditionalData ()
 
 setAdditionalData (array $additional_data)
 
 toArray ()
 

Detailed Description

Definition at line 25 of file BlockDTO.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\components\Dashboard\Block\BlockDTO::__construct ( private string  $type,
private int  $ref_id,
private int  $obj_id,
private string  $title,
private string  $description,
private ?ilDateTime  $startDate = null,
private ?ilDateTime  $endDate = null,
private array  $additional_data = [] 
)

Definition at line 27 of file BlockDTO.php.

References $ref_id.

36  {
37  $this->type = $type;
38  $this->ref_id = $ref_id;
39  $this->obj_id = $obj_id;
40  $this->title = $title;
41  $this->description = $description;
42  $this->startDate = $startDate;
43  $this->endDate = $endDate;
44  $this->additional_data = $additional_data;
45  }
$ref_id
Definition: ltiauth.php:65

Member Function Documentation

◆ getAdditionalData()

ILIAS\components\Dashboard\Block\BlockDTO::getAdditionalData ( )

Definition at line 137 of file BlockDTO.php.

Referenced by ilDashboardBlockGUI\getListItemForDataDTO().

137  : array
138  {
139  return $this->additional_data;
140  }
+ Here is the caller graph for this function:

◆ getDescription()

ILIAS\components\Dashboard\Block\BlockDTO::getDescription ( )

Definition at line 87 of file BlockDTO.php.

Referenced by ilDashboardBlockGUI\getCardForData(), and ilDashboardBlockGUI\getListItemForDataDTO().

87  : string
88  {
89  return $this->description;
90  }
+ Here is the caller graph for this function:

◆ getEndDate()

ILIAS\components\Dashboard\Block\BlockDTO::getEndDate ( )

Definition at line 107 of file BlockDTO.php.

107  : ?ilDateTime
108  {
109  return $this->endDate;
110  }

◆ getObjId()

ILIAS\components\Dashboard\Block\BlockDTO::getObjId ( )

Definition at line 67 of file BlockDTO.php.

Referenced by ilDashboardBlockGUI\getCardForData(), and ilDashboardBlockGUI\getListItemForDataDTO().

67  : int
68  {
69  return $this->obj_id;
70  }
+ Here is the caller graph for this function:

◆ getRefId()

ILIAS\components\Dashboard\Block\BlockDTO::getRefId ( )

Definition at line 57 of file BlockDTO.php.

References $ref_id.

Referenced by ilDashboardBlockGUI\getCardForData(), ilDashboardBlockGUI\getData(), and ilDashboardBlockGUI\getListItemForDataDTO().

57  : int
58  {
59  return $this->ref_id;
60  }
$ref_id
Definition: ltiauth.php:65
+ Here is the caller graph for this function:

◆ getStartDate()

ILIAS\components\Dashboard\Block\BlockDTO::getStartDate ( )

Definition at line 97 of file BlockDTO.php.

Referenced by ilDashboardBlockGUI\sortByDate().

97  : ?ilDateTime
98  {
99  return $this->startDate;
100  }
+ Here is the caller graph for this function:

◆ getTitle()

ILIAS\components\Dashboard\Block\BlockDTO::getTitle ( )

Definition at line 77 of file BlockDTO.php.

Referenced by ilDashboardBlockGUI\getCardForData(), ilDashboardBlockGUI\getListItemForDataDTO(), and ilDashboardBlockGUI\sortByTitle().

77  : string
78  {
79  return $this->title;
80  }
+ Here is the caller graph for this function:

◆ getType()

ILIAS\components\Dashboard\Block\BlockDTO::getType ( )

Definition at line 47 of file BlockDTO.php.

Referenced by ilDashboardBlockGUI\getCardForData(), and ilDashboardBlockGUI\getListItemForDataDTO().

47  : string
48  {
49  return $this->type;
50  }
+ Here is the caller graph for this function:

◆ hasEnded()

ILIAS\components\Dashboard\Block\BlockDTO::hasEnded ( )

Definition at line 122 of file BlockDTO.php.

References IL_CAL_UNIX.

Referenced by ILIAS\components\Dashboard\Block\BlockDTO\isRunning().

122  : bool
123  {
124  return $this->endDate && $this->endDate->get(IL_CAL_UNIX) < time();
125  }
const IL_CAL_UNIX
+ Here is the caller graph for this function:

◆ hasNotStarted()

ILIAS\components\Dashboard\Block\BlockDTO::hasNotStarted ( )

Definition at line 117 of file BlockDTO.php.

References IL_CAL_UNIX.

Referenced by ILIAS\components\Dashboard\Block\BlockDTO\isRunning().

117  : bool
118  {
119  return $this->startDate && $this->startDate->get(IL_CAL_UNIX) > time();
120  }
const IL_CAL_UNIX
+ Here is the caller graph for this function:

◆ isDated()

ILIAS\components\Dashboard\Block\BlockDTO::isDated ( )

Definition at line 132 of file BlockDTO.php.

132  : bool
133  {
134  return $this->startDate || $this->endDate;
135  }

◆ isRunning()

ILIAS\components\Dashboard\Block\BlockDTO::isRunning ( )

Definition at line 127 of file BlockDTO.php.

References ILIAS\components\Dashboard\Block\BlockDTO\hasEnded(), and ILIAS\components\Dashboard\Block\BlockDTO\hasNotStarted().

127  : bool
128  {
129  return !$this->hasNotStarted() && !$this->hasEnded();
130  }
+ Here is the call graph for this function:

◆ setAdditionalData()

ILIAS\components\Dashboard\Block\BlockDTO::setAdditionalData ( array  $additional_data)

Definition at line 142 of file BlockDTO.php.

142  : void
143  {
144  $this->additional_data = $additional_data;
145  }

◆ setDescription()

ILIAS\components\Dashboard\Block\BlockDTO::setDescription ( string  $description)

Definition at line 92 of file BlockDTO.php.

92  : void
93  {
94  $this->description = $description;
95  }

◆ setEndDate()

ILIAS\components\Dashboard\Block\BlockDTO::setEndDate ( ?ilDateTime  $endDate)

Definition at line 112 of file BlockDTO.php.

112  : void
113  {
114  $this->endDate = $endDate;
115  }

◆ setObjId()

ILIAS\components\Dashboard\Block\BlockDTO::setObjId ( int  $obj_id)

Definition at line 72 of file BlockDTO.php.

72  : void
73  {
74  $this->obj_id = $obj_id;
75  }

◆ setRefId()

ILIAS\components\Dashboard\Block\BlockDTO::setRefId ( int  $ref_id)

Definition at line 62 of file BlockDTO.php.

References $ref_id.

62  : void
63  {
64  $this->ref_id = $ref_id;
65  }
$ref_id
Definition: ltiauth.php:65

◆ setStartDate()

ILIAS\components\Dashboard\Block\BlockDTO::setStartDate ( ?ilDateTime  $startDate)

Definition at line 102 of file BlockDTO.php.

102  : void
103  {
104  $this->startDate = $startDate;
105  }

◆ setTitle()

ILIAS\components\Dashboard\Block\BlockDTO::setTitle ( string  $title)

Definition at line 82 of file BlockDTO.php.

82  : void
83  {
84  $this->title = $title;
85  }

◆ setType()

ILIAS\components\Dashboard\Block\BlockDTO::setType ( string  $type)

Definition at line 52 of file BlockDTO.php.

52  : void
53  {
54  $this->type = $type;
55  }

◆ toArray()

ILIAS\components\Dashboard\Block\BlockDTO::toArray ( )

Definition at line 147 of file BlockDTO.php.

References $ref_id, and IL_CAL_DATETIME.

147  : array
148  {
149  return [
150  'type' => $this->type,
151  'ref_id' => $this->ref_id,
152  'obj_id' => $this->obj_id,
153  'title' => $this->title,
154  'description' => $this->description,
155  'start_date' => $this->startDate?->get(IL_CAL_DATETIME),
156  'end_date' => $this->endDate?->get(IL_CAL_DATETIME),
157  'additional_data' => $this->additional_data
158  ];
159  }
const IL_CAL_DATETIME
$ref_id
Definition: ltiauth.php:65

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