ILIAS  release_8 Revision v8.24
ilProfileChecklistGUI Class Reference
+ Collaboration diagram for ilProfileChecklistGUI:

Public Member Functions

 __construct ()
 
 render (int $active_step)
 

Protected Member Functions

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

Protected Attributes

ILIAS DI UIServices $ui
 
ilProfileChecklistStatus $status
 
ilLanguage $lng
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilProfileChecklistGUI::__construct ( )

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

31 {
32 global $DIC;
33
34 $this->ui = $DIC->ui();
35 $this->status = new ilProfileChecklistStatus();
36 $this->lng = $DIC->language();
37 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28

References $DIC, ILIAS\Repository\lng(), and ILIAS\Repository\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.

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

71 : int
72 {
73 switch ($check_list_status) {
74 case ilProfileChecklistStatus::STATUS_NOT_STARTED: return Step::NOT_STARTED;
75 case ilProfileChecklistStatus::STATUS_IN_PROGRESS: return Step::IN_PROGRESS;
76 case ilProfileChecklistStatus::STATUS_SUCCESSFUL: return Step::SUCCESSFULLY;
77 }
78 return 0;
79 }

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 ( int  $active_step)

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

39 : string
40 {
41 $ui = $this->ui;
43 $active_step_nr = 0;
44 $workflow_factory = $ui->factory()->listing()->workflow();
46
47 //setup steps
48 $steps = [];
49 $cnt = 0;
50 foreach ($this->status->getSteps() as $step => $txt) {
51 if ($step == $active_step) {
52 $active_step_nr = $cnt;
53 }
54 $cnt++;
55 $s = $workflow_factory->step($txt, $status->getStatusDetails($step))
56 ->withStatus($this->getUIChecklistStatus($status->getStatus($step)));
57 $steps[] = $s;
58 }
59
60 //setup linear workflow
61 $wf = $workflow_factory->linear($lng->txt("user_privacy_checklist"), $steps)
62 ->withActive($active_step_nr);
63
64 //render
65 return $ui->renderer()->render($wf);
66 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getUIChecklistStatus(int $check_list_status)
Get ui checklist status.
ilProfileChecklistStatus $status
getStatusDetails(int $step)
Get status details.
getStatus(int $step)
Get status of step.
$txt
Definition: error.php:13
$steps
Definition: latex.php:3

References $lng, $status, $steps, $txt, $ui, ilProfileChecklistStatus\getStatus(), ilProfileChecklistStatus\getStatusDetails(), getUIChecklistStatus(), and ilLanguage\txt().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ilProfileChecklistGUI::$lng
protected

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

Referenced by render().

◆ $status

ilProfileChecklistStatus ilProfileChecklistGUI::$status
protected

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

Referenced by render().

◆ $ui

ILIAS DI UIServices ilProfileChecklistGUI::$ui
protected

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

Referenced by render().


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