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

Public Member Functions

 __construct (InternalRepoService $repo, InternalDomainService $domain)
 
 isTooltipIdentifierVisible ()
 
 areTooltipsVisible ()
 
 areSubMenuTooltipsVisible ()
 
 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 Member Functions

 isTooltipMainTextVisible ()
 

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 133 of file TooltipsManager.php.

137 : void {
138 $this->repo->addTooltip($a_tt_id, $a_text, $a_module_id);
139 }

◆ areSubMenuTooltipsVisible()

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

Definition at line 58 of file TooltipsManager.php.

58 : bool
59 {
60 return $this->isTooltipMainTextVisible();
61 }

References ILIAS\Help\Tooltips\TooltipsManager\isTooltipMainTextVisible().

+ Here is the call graph for this function:

◆ areTooltipsVisible()

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

Definition at line 52 of file TooltipsManager.php.

52 : bool
53 {
54 return $this->gd_admin->areIdentifiersVisible() ||
56 }

References ILIAS\Help\Tooltips\TooltipsManager\isTooltipMainTextVisible().

+ Here is the call graph for this function:

◆ deleteTooltip()

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

Definition at line 160 of file TooltipsManager.php.

162 : void {
163 $this->repo->deleteTooltip($a_id);
164 }

◆ deleteTooltipsOfModule()

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

Definition at line 166 of file TooltipsManager.php.

168 : void {
169 $this->repo->deleteTooltipsOfModule($module_id);
170 }

◆ getAllTooltips()

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

Definition at line 126 of file TooltipsManager.php.

129 : array {
130 return $this->repo->getAllTooltips($a_comp, $a_module_id);
131 }

◆ getMainMenuTooltip()

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

Definition at line 120 of file TooltipsManager.php.

122 : string {
123 return $a_item_id;
124 }

◆ getObjCreationTooltipText()

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

Get object_creation tooltip tab text.

Definition at line 111 of file TooltipsManager.php.

113 : string {
114 return $this->getTooltipPresentationText($a_type . "_create");
115 }

◆ getTooltipComponents()

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

Definition at line 150 of file TooltipsManager.php.

152 : array {
153 $comps[""] = "- " . $this->lng->txt("help_all") . " -";
154 foreach ($this->repo->getTooltipComponents($a_module_id) as $c) {
155 $comps[$c] = $c;
156 }
157 return $comps;
158 }
$c
Definition: deliver.php:25

References $c.

◆ getTooltipPresentationText()

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

Definition at line 80 of file TooltipsManager.php.

82 : string {
83
84 $show_main_text = $this->isTooltipMainTextVisible();
85
86 if (!$show_main_text) {
87 if ($this->isTooltipIdentifierVisible()) {
88 return $a_tt_id;
89 } else {
90 return "";
91 }
92 }
93 if ($this->domain->module()->isAuthoringMode()) {
94 $module_ids = [0];
95 } else {
96 $module_ids = $this->domain->module()->getActiveModules();
97 }
98 $text = $this->repo->getTooltipPresentationText(
99 $a_tt_id,
100 $module_ids
101 );
102 if ($this->isTooltipIdentifierVisible()) {
103 $text .= "[" . $a_tt_id . "]";
104 }
105 return $text;
106 }
$text
Definition: xapiexit.php:21

References ILIAS\Help\Tooltips\TooltipsManager\isTooltipIdentifierVisible().

+ Here is the call graph for this function:

◆ isTooltipIdentifierVisible()

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

Definition at line 47 of file TooltipsManager.php.

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

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

+ Here is the caller graph for this function:

◆ isTooltipMainTextVisible()

ILIAS\Help\Tooltips\TooltipsManager::isTooltipMainTextVisible ( )
protected

Definition at line 63 of file TooltipsManager.php.

63 : bool
64 {
65 $show_main_text = true;
66 if ($this->user->getLanguage() !== "de") {
67 $show_main_text = false;
68 }
69
70 if ($this->settings->get("help_mode") === "1") {
71 $show_main_text = false;
72 }
73
74 if ($this->user->getPref("hide_help_tt")) {
75 $show_main_text = false;
76 }
77 return $show_main_text;
78 }

References ILIAS\Repository\settings(), and ILIAS\Repository\user().

Referenced by ILIAS\Help\Tooltips\TooltipsManager\areSubMenuTooltipsVisible(), and ILIAS\Help\Tooltips\TooltipsManager\areTooltipsVisible().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTooltip()

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

Definition at line 141 of file TooltipsManager.php.

145 : void {
146 $this->repo->updateTooltip($a_id, $a_text, $a_tt_id);
147 }

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: