ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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...
 
 standardProgressMeter (LPInterface $lp_info)
 
 standardItem (ObjectDataInterface $object_info, PropertyListInterface $property_list, ?URI $title_link=null)
 The optional link is applied to the title. More...
 
 fixedSizeProgressMeter (LPInterface $lp_info)
 

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.

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

◆ fixedSizeProgressMeter()

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

Implements ILIAS\Tracking\View\Renderer\RendererInterface.

Definition at line 52 of file Renderer.php.

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

◆ 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.

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 }

References ILIAS\Tracking\View\PropertyList\PropertyListInterface\key().

+ 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.

45 : UIStandardProgressMeter {
46 return $this->ui->factory()->chart()->progressMeter()->standard(
47 100,
48 $this->determinePercentage($lp_info)
49 );
50 }

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