ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilProfileChecklistGUI Class Reference
+ Collaboration diagram for ilProfileChecklistGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 render ($active_step)
 Render. More...
 

Protected Member Functions

 getUIChecklistStatus (int $check_list_status)
 Get ui checklist status. More...
 

Protected Attributes

 $ui
 
 $status
 
 $lng
 

Detailed Description

Author
@leifos.de

Definition at line 13 of file class.ilProfileChecklistGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilProfileChecklistGUI::__construct ( )

Constructor.

Definition at line 33 of file class.ilProfileChecklistGUI.php.

34 {
35 global $DIC;
36
37 $this->ui = $DIC->ui();
38 $this->status = new ilProfileChecklistStatus();
39 $this->lng = $DIC->language();
40 }
ui()
Definition: ui.php:5
$DIC
Definition: xapitoken.php:46

References $DIC, and ui().

+ Here is the call graph for this function:

Member Function Documentation

◆ getUIChecklistStatus()

ilProfileChecklistGUI::getUIChecklistStatus ( int  $check_list_status)
protected

Get ui checklist status.

Maps the checklist status to the UI element status.

Parameters
int$check_list_status
Returns
int

Definition at line 81 of file class.ilProfileChecklistGUI.php.

82 {
83 switch ($check_list_status) {
84 case ilProfileChecklistStatus::STATUS_NOT_STARTED: return Step::NOT_STARTED; break;
85 case ilProfileChecklistStatus::STATUS_IN_PROGRESS: return Step::IN_PROGRESS; break;
86 case ilProfileChecklistStatus::STATUS_SUCCESSFUL: return Step::SUCCESSFULLY; break;
87 }
88 }

References ilProfileChecklistStatus\STATUS_IN_PROGRESS, ilProfileChecklistStatus\STATUS_NOT_STARTED, and ilProfileChecklistStatus\STATUS_SUCCESSFUL.

Referenced by render().

+ Here is the caller graph for this function:

◆ render()

ilProfileChecklistGUI::render (   $active_step)

Render.

Parameters

return

Definition at line 48 of file class.ilProfileChecklistGUI.php.

49 {
50 $ui = $this->ui;
52 $workflow_factory = $ui->factory()->listing()->workflow();
54
55 //setup steps
56 $steps = [];
57 $cnt = 0;
58 foreach ($this->status->getSteps() as $step => $txt) {
59 if ($step == $active_step) {
60 $active_step_nr = $cnt;
61 }
62 $cnt++;
63 $s = $workflow_factory->step($txt, $status->getStatusDetails($step))
64 ->withStatus($this->getUIChecklistStatus($status->getStatus($step)));
65 $steps[] = $s;
66 }
67
68 //setup linear workflow
69 $wf = $workflow_factory->linear($lng->txt("user_privacy_checklist"), $steps)
70 ->withActive($active_step_nr);
71
72 //render
73 return $ui->renderer()->render($wf);
74 }
getUIChecklistStatus(int $check_list_status)
Get ui checklist status.
$txt
Definition: error.php:13
$steps
Definition: latex.php:3

References $lng, $status, $steps, $txt, $ui, and getUIChecklistStatus().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilProfileChecklistGUI::$lng
protected

Definition at line 28 of file class.ilProfileChecklistGUI.php.

Referenced by render().

◆ $status

ilProfileChecklistGUI::$status
protected

Definition at line 23 of file class.ilProfileChecklistGUI.php.

Referenced by render().

◆ $ui

ilProfileChecklistGUI::$ui
protected

Definition at line 18 of file class.ilProfileChecklistGUI.php.

Referenced by render().


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