ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\Tracking\View\Renderer\Renderer Class Reference
+ Inheritance diagram for ILIAS\Tracking\View\Renderer\Renderer:
+ Collaboration diagram for ILIAS\Tracking\View\Renderer\Renderer:

Public Member Functions

 __construct (protected UIServices $ui)
 
 standardProgressMeter (LPInterface $lp_info)
 
 fixedSizeProgressMeter (LPInterface $lp_info)
 
 standardItem (ObjectDataInterface $object_info, PropertyListInterface $property_list, ?URI $title_link=null)
 The optional link is applied to the title. More...
 

Protected Member Functions

 determinePercentage (LPInterface $lp_info)
 

Detailed Description

Definition at line 36 of file Renderer.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Tracking\View\Renderer\Renderer::__construct ( protected UIServices  $ui)

Definition at line 38 of file Renderer.php.

40  {
41  }

Member Function Documentation

◆ determinePercentage()

ILIAS\Tracking\View\Renderer\Renderer::determinePercentage ( LPInterface  $lp_info)
protected

Definition at line 85 of file Renderer.php.

References ILIAS\Tracking\View\DataRetrieval\Info\LPInterface\getLPStatus(), ILIAS\Tracking\View\DataRetrieval\Info\LPInterface\getPercentage(), ILIAS\Tracking\View\DataRetrieval\Info\LPInterface\hasPercentage(), and ilLPStatus\LP_STATUS_COMPLETED_NUM.

Referenced by ILIAS\Tracking\View\Renderer\Renderer\fixedSizeProgressMeter(), and ILIAS\Tracking\View\Renderer\Renderer\standardProgressMeter().

87  : int {
88  $percentage = $lp_info->getPercentage();
89  $percentage_by_status = $lp_info->getLPStatus() === ilLPStatus::LP_STATUS_COMPLETED_NUM ? 100 : 0;
90  return !$lp_info->hasPercentage() ? $percentage_by_status : $percentage;
91  }
const LP_STATUS_COMPLETED_NUM
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixedSizeProgressMeter()

ILIAS\Tracking\View\Renderer\Renderer::fixedSizeProgressMeter ( LPInterface  $lp_info)

Implements ILIAS\Tracking\View\Renderer\RendererInterface.

Definition at line 52 of file Renderer.php.

References ILIAS\Tracking\View\Renderer\Renderer\determinePercentage(), and ILIAS\Repository\ui().

54  : UIStandardProgressMeter {
55  return $this->ui->factory()->chart()->progressMeter()->fixedSize(
56  100,
57  $this->determinePercentage($lp_info)
58  );
59  }
determinePercentage(LPInterface $lp_info)
Definition: Renderer.php:85
+ Here is the call graph for this function:

◆ standardItem()

ILIAS\Tracking\View\Renderer\Renderer::standardItem ( ObjectDataInterface  $object_info,
PropertyListInterface  $property_list,
?URI  $title_link = null 
)

The optional link is applied to the title.

Implements ILIAS\Tracking\View\Renderer\RendererInterface.

Definition at line 61 of file Renderer.php.

References ILIAS\Tracking\View\DataRetrieval\Info\ObjectDataInterface\getDescription(), ILIAS\Tracking\View\DataRetrieval\Info\ObjectDataInterface\getTitle(), ILIAS\Tracking\View\DataRetrieval\Info\ObjectDataInterface\getType(), ILIAS\Tracking\View\PropertyList\PropertyListInterface\key(), null, and ILIAS\Repository\ui().

65  : UIStandardItem {
66  $properties = [];
67  foreach ($property_list as $property) {
68  $properties[$property_list->key()] = $property;
69  }
70  $icon = $this->ui->factory()->symbol()->icon()->standard(
71  $object_info->getType(),
72  $object_info->getType() . " Icon",
73  UIIconIcon::MEDIUM
74  );
75  $title = $object_info->getTitle();
76  if ($title_link !== null) {
77  $title = $this->ui->factory()->link()->standard($title, (string) $title_link);
78  }
79  return $this->ui->factory()->item()->standard($title)
80  ->withProperties($properties)
81  ->withDescription($object_info->getDescription())
82  ->withLeadIcon($icon);
83  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ standardProgressMeter()

ILIAS\Tracking\View\Renderer\Renderer::standardProgressMeter ( LPInterface  $lp_info)

Implements ILIAS\Tracking\View\Renderer\RendererInterface.

Definition at line 43 of file Renderer.php.

References ILIAS\Tracking\View\Renderer\Renderer\determinePercentage(), and ILIAS\Repository\ui().

45  : UIStandardProgressMeter {
46  return $this->ui->factory()->chart()->progressMeter()->standard(
47  100,
48  $this->determinePercentage($lp_info)
49  );
50  }
determinePercentage(LPInterface $lp_info)
Definition: Renderer.php:85
+ Here is the call graph for this function:

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