ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ILIAS\Help\Tooltips\TooltipsManager Class Reference
+ Collaboration diagram for ILIAS\Help\Tooltips\TooltipsManager:

Public Member Functions

 __construct (InternalRepoService $repo, InternalDomainService $domain)
 
 isTooltipIdentifierVisible ()
 
 getTooltipPresentationText (string $a_tt_id)
 
 getObjCreationTooltipText (string $a_type)
 Get object_creation tooltip tab text. More...
 
 getMainMenuTooltip (string $a_item_id)
 
 getAllTooltips (string $a_comp="", int $a_module_id=0)
 
 addTooltip (string $a_tt_id, string $a_text, int $a_module_id=0)
 
 updateTooltip (int $a_id, string $a_text, string $a_tt_id)
 
 getTooltipComponents (int $a_module_id=0)
 
 deleteTooltip (int $a_id)
 
 deleteTooltipsOfModule (int $module_id)
 

Protected Attributes

ILIAS Help GuidedTour Admin AdminManager $gd_admin
 
ilLanguage $lng
 
ilObjUser $user
 
ilSetting $settings
 
InternalDomainService $domain
 
TooltipsDBRepository $repo
 

Detailed Description

Definition at line 26 of file TooltipsManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Help\Tooltips\TooltipsManager::__construct ( InternalRepoService  $repo,
InternalDomainService  $domain 
)

Definition at line 35 of file TooltipsManager.php.

38 {
39 $this->repo = $repo->tooltips();
40 $this->domain = $domain;
41 $this->settings = $domain->settings();
42 $this->user = $domain->user();
43 $this->lng = $domain->lng();
44 $this->gd_admin = $domain->guidedTour()->admin();
45 }

References ILIAS\Help\Tooltips\TooltipsManager\$domain, ILIAS\Help\Tooltips\TooltipsManager\$repo, ILIAS\Help\InternalDomainService\guidedTour(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ addTooltip()

ILIAS\Help\Tooltips\TooltipsManager::addTooltip ( string  $a_tt_id,
string  $a_text,
int  $a_module_id = 0 
)

Definition at line 117 of file TooltipsManager.php.

121 : void {
122 $this->repo->addTooltip($a_tt_id, $a_text, $a_module_id);
123 }

◆ deleteTooltip()

ILIAS\Help\Tooltips\TooltipsManager::deleteTooltip ( int  $a_id)

Definition at line 144 of file TooltipsManager.php.

146 : void {
147 $this->repo->deleteTooltip($a_id);
148 }

◆ deleteTooltipsOfModule()

ILIAS\Help\Tooltips\TooltipsManager::deleteTooltipsOfModule ( int  $module_id)

Definition at line 150 of file TooltipsManager.php.

152 : void {
153 $this->repo->deleteTooltipsOfModule($module_id);
154 }

◆ getAllTooltips()

ILIAS\Help\Tooltips\TooltipsManager::getAllTooltips ( string  $a_comp = "",
int  $a_module_id = 0 
)

Definition at line 110 of file TooltipsManager.php.

113 : array {
114 return $this->repo->getAllTooltips($a_comp, $a_module_id);
115 }

◆ getMainMenuTooltip()

ILIAS\Help\Tooltips\TooltipsManager::getMainMenuTooltip ( string  $a_item_id)
Returns
string tooltip text

Definition at line 104 of file TooltipsManager.php.

106 : string {
107 return $this->getTooltipPresentationText($a_item_id);
108 }

◆ getObjCreationTooltipText()

ILIAS\Help\Tooltips\TooltipsManager::getObjCreationTooltipText ( string  $a_type)

Get object_creation tooltip tab text.

Definition at line 95 of file TooltipsManager.php.

97 : string {
98 return $this->getTooltipPresentationText($a_type . "_create");
99 }

◆ getTooltipComponents()

ILIAS\Help\Tooltips\TooltipsManager::getTooltipComponents ( int  $a_module_id = 0)

Definition at line 134 of file TooltipsManager.php.

136 : array {
137 $comps[""] = "- " . $this->lng->txt("help_all") . " -";
138 foreach ($this->repo->getTooltipComponents($a_module_id) as $c) {
139 $comps[$c] = $c;
140 }
141 return $comps;
142 }
$c
Definition: deliver.php:25

References $c.

◆ getTooltipPresentationText()

ILIAS\Help\Tooltips\TooltipsManager::getTooltipPresentationText ( string  $a_tt_id)

Definition at line 52 of file TooltipsManager.php.

54 : string {
55
56 $show_main_text = true;
57 if ($this->user->getLanguage() !== "de") {
58 $show_main_text = false;
59 }
60
61 if ($this->settings->get("help_mode") === "1") {
62 $show_main_text = false;
63 }
64
65 if ($this->user->getPref("hide_help_tt")) {
66 $show_main_text = false;
67 }
68
69 if (!$show_main_text) {
70 if ($this->isTooltipIdentifierVisible()) {
71 return $a_tt_id;
72 } else {
73 return "";
74 }
75 }
76
77 if ($this->domain->module()->isAuthoringMode()) {
78 $module_ids = [0];
79 } else {
80 $module_ids = $this->domain->module()->getActiveModules();
81 }
82 $text = $this->repo->getTooltipPresentationText(
83 $a_tt_id,
84 $module_ids
85 );
86 if ($this->isTooltipIdentifierVisible()) {
87 $text .= "[" . $a_tt_id . "]";
88 }
89 return $text;
90 }
$text
Definition: xapiexit.php:21

◆ isTooltipIdentifierVisible()

ILIAS\Help\Tooltips\TooltipsManager::isTooltipIdentifierVisible ( )

Definition at line 47 of file TooltipsManager.php.

47 : bool
48 {
49 return $this->gd_admin->areIdentifiersVisible();
50 }

◆ updateTooltip()

ILIAS\Help\Tooltips\TooltipsManager::updateTooltip ( int  $a_id,
string  $a_text,
string  $a_tt_id 
)

Definition at line 125 of file TooltipsManager.php.

129 : void {
130 $this->repo->updateTooltip($a_id, $a_text, $a_tt_id);
131 }

Field Documentation

◆ $domain

InternalDomainService ILIAS\Help\Tooltips\TooltipsManager::$domain
protected

Definition at line 32 of file TooltipsManager.php.

Referenced by ILIAS\Help\Tooltips\TooltipsManager\__construct().

◆ $gd_admin

ILIAS Help GuidedTour Admin AdminManager ILIAS\Help\Tooltips\TooltipsManager::$gd_admin
protected

Definition at line 28 of file TooltipsManager.php.

◆ $lng

ilLanguage ILIAS\Help\Tooltips\TooltipsManager::$lng
protected

Definition at line 29 of file TooltipsManager.php.

◆ $repo

TooltipsDBRepository ILIAS\Help\Tooltips\TooltipsManager::$repo
protected

Definition at line 33 of file TooltipsManager.php.

Referenced by ILIAS\Help\Tooltips\TooltipsManager\__construct().

◆ $settings

ilSetting ILIAS\Help\Tooltips\TooltipsManager::$settings
protected

Definition at line 31 of file TooltipsManager.php.

◆ $user

ilObjUser ILIAS\Help\Tooltips\TooltipsManager::$user
protected

Definition at line 30 of file TooltipsManager.php.


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