ILIAS  trunk Revision v11.0_alpha-1851-ga8564da6fed
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilProfileChecklistGUI Class Reference
+ Collaboration diagram for ilProfileChecklistGUI:

Public Member Functions

 render (int $active_step)
 

Protected Member Functions

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

Protected Attributes

UIFactory $ui_factory
 
ChecklistStatus $status
 
Language $lng
 

Private Attributes

UIRenderer $ui_renderer
 

Detailed Description

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

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

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 86 of file class.ilProfileChecklistGUI.php.

Referenced by render().

86  : int
87  {
88  switch ($check_list_status) {
89  case ChecklistStatus::STATUS_NOT_STARTED: return Step::NOT_STARTED;
90  case ChecklistStatus::STATUS_IN_PROGRESS: return Step::IN_PROGRESS;
91  case ChecklistStatus::STATUS_SUCCESSFUL: return Step::SUCCESSFULLY;
92  }
93  return 0;
94  }
+ Here is the caller graph for this function:

◆ render()

ilProfileChecklistGUI::render ( int  $active_step)

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

References $status, $txt, ILIAS\User\Profile\ChecklistStatus\getStatus(), ILIAS\User\Profile\ChecklistStatus\getStatusDetails(), getUIChecklistStatus(), and ILIAS\Repository\lng().

56  : string
57  {
58  $active_step_nr = 0;
59  $workflow_factory = $this->ui_factory->listing()->workflow();
61 
62  //setup steps
63  $steps = [];
64  $cnt = 0;
65  foreach ($this->status->getSteps() as $step => $txt) {
66  if ($step == $active_step) {
67  $active_step_nr = $cnt;
68  }
69  $cnt++;
70  $s = $workflow_factory->step($txt, $status->getStatusDetails($step))
71  ->withStatus($this->getUIChecklistStatus($status->getStatus($step)));
72  $steps[] = $s;
73  }
74 
75  //setup linear workflow
76  $wf = $workflow_factory->linear($this->lng->txt("user_privacy_checklist"), $steps)
77  ->withActive($active_step_nr);
78 
79  //render
80  return $this->ui_renderer->render($wf);
81  }
getUIChecklistStatus(int $check_list_status)
Get ui checklist status.
$txt
Definition: error.php:31
+ Here is the call graph for this function:

Field Documentation

◆ $lng

Language ilProfileChecklistGUI::$lng
protected

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

◆ $status

ChecklistStatus ilProfileChecklistGUI::$status
protected

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

Referenced by render().

◆ $ui_factory

UIFactory ilProfileChecklistGUI::$ui_factory
protected

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

◆ $ui_renderer

UIRenderer ilProfileChecklistGUI::$ui_renderer
private

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


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