ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAbstractLearningHistoryProvider.php
Go to the documentation of this file.
1<?php
2
23abstract class ilAbstractLearningHistoryProvider //TODO-PHP8-REVIEW please add the methods that need to be overwritten
24{
25 protected int $user_id; // User id. This is the user the history will be retrieved for.
27 protected ilLanguage $lng;
29
30 public function __construct(
31 int $user_id,
34 ?ilTemplate $template = null
35 ) {
36 $this->user_id = $user_id;
37 $this->factory = $factory;
38 $this->lng = $lng;
39
40 if ($template === null) {
42 'tpl.emphasized_title.php',
43 true,
44 true,
45 'components/ILIAS/LearningHistory'
46 );
47 }
48 $this->template = $template;
49 }
50
51 protected function getUserId(): int
52 {
53 return $this->user_id;
54 }
55
57 {
58 return $this->factory;
59 }
60
61 protected function getLanguage(): ilLanguage
62 {
63 return $this->lng;
64 }
65
66 protected function getEmphasizedTitle(string $title): string
67 {
68 $clone = clone $this->template;
69 $clone->setVariable("TITLE", $title);
70 return $clone->get();
71 }
72}
factory()
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(int $user_id, ilLearningHistoryFactory $factory, ilLanguage $lng, ?ilTemplate $template=null)
language handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR