ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Help\Tooltips\TooltipsManager Class Reference
+ Collaboration diagram for ILIAS\Help\Tooltips\TooltipsManager:

Public Member Functions

 __construct (InternalRepoService $repo, InternalDomainService $domain)
 
 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

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

37 {
38 $this->repo = $repo->tooltips();
39 $this->domain = $domain;
40 $this->settings = $domain->settings();
41 $this->user = $domain->user();
42 $this->lng = $domain->lng();
43 }

References ILIAS\Help\Tooltips\TooltipsManager\$domain, ILIAS\Help\Tooltips\TooltipsManager\$repo, 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 97 of file TooltipsManager.php.

101 : void {
102 $this->repo->addTooltip($a_tt_id, $a_text, $a_module_id);
103 }

◆ deleteTooltip()

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

Definition at line 124 of file TooltipsManager.php.

126 : void {
127 $this->repo->deleteTooltip($a_id);
128 }

◆ deleteTooltipsOfModule()

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

Definition at line 130 of file TooltipsManager.php.

132 : void {
133 $this->repo->deleteTooltipsOfModule($module_id);
134 }

◆ getAllTooltips()

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

Definition at line 90 of file TooltipsManager.php.

93 : array {
94 return $this->repo->getAllTooltips($a_comp, $a_module_id);
95 }

◆ getMainMenuTooltip()

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

Definition at line 84 of file TooltipsManager.php.

86 : string {
87 return $this->getTooltipPresentationText($a_item_id);
88 }

◆ getObjCreationTooltipText()

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

Get object_creation tooltip tab text.

Definition at line 75 of file TooltipsManager.php.

77 : string {
78 return $this->getTooltipPresentationText($a_type . "_create");
79 }

◆ getTooltipComponents()

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

Definition at line 114 of file TooltipsManager.php.

116 : array {
117 $comps[""] = "- " . $this->lng->txt("help_all") . " -";
118 foreach ($this->repo->getTooltipComponents($a_module_id) as $c) {
119 $comps[$c] = $c;
120 }
121 return $comps;
122 }
$c
Definition: deliver.php:25

References $c.

◆ getTooltipPresentationText()

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

Definition at line 45 of file TooltipsManager.php.

47 : string {
48
49 if ($this->user->getLanguage() !== "de") {
50 return "";
51 }
52
53 if ($this->settings->get("help_mode") === "1") {
54 return "";
55 }
56
57 if ($this->user->getPref("hide_help_tt")) {
58 return "";
59 }
60
61 if ($this->domain->module()->isAuthoringMode()) {
62 $module_ids = [0];
63 } else {
64 $module_ids = $this->domain->module()->getActiveModules();
65 }
66 return $this->repo->getTooltipPresentationText(
67 $a_tt_id,
68 $module_ids
69 );
70 }

◆ updateTooltip()

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

Definition at line 105 of file TooltipsManager.php.

109 : void {
110 $this->repo->updateTooltip($a_id, $a_text, $a_tt_id);
111 }

Field Documentation

◆ $domain

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

Definition at line 31 of file TooltipsManager.php.

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

◆ $lng

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

Definition at line 28 of file TooltipsManager.php.

◆ $repo

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

Definition at line 32 of file TooltipsManager.php.

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

◆ $settings

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

Definition at line 30 of file TooltipsManager.php.

◆ $user

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

Definition at line 29 of file TooltipsManager.php.


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