ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

References ILIAS\Help\Tooltips\TooltipsManager\$domain, ILIAS\Repository\lng(), ILIAS\Repository\settings(), ILIAS\Help\InternalRepoService\tooltips(), and ILIAS\Repository\user().

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

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

86  : string {
87  return $this->getTooltipPresentationText($a_item_id);
88  }
+ Here is the call graph for this function:

◆ getObjCreationTooltipText()

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

Get object_creation tooltip tab text.

Definition at line 75 of file TooltipsManager.php.

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

77  : string {
78  return $this->getTooltipPresentationText($a_type . "_create");
79  }
+ Here is the call graph for this function:

◆ getTooltipComponents()

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

Definition at line 114 of file TooltipsManager.php.

References $c, and ILIAS\Repository\lng().

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
+ Here is the call graph for this function:

◆ getTooltipPresentationText()

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

Definition at line 45 of file TooltipsManager.php.

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

Referenced by ILIAS\Help\Tooltips\TooltipsManager\getMainMenuTooltip(), and ILIAS\Help\Tooltips\TooltipsManager\getObjCreationTooltipText().

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

◆ $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: