ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
EmployeeTalkUserActionProvider Class Reference
+ Inheritance diagram for EmployeeTalkUserActionProvider:
+ Collaboration diagram for EmployeeTalkUserActionProvider:

Public Member Functions

 collectActionsForTargetUser (int $a_target_user)
 
 getComponentId ()
 
 getActionTypes ()
 
- Public Member Functions inherited from ilUserActionProvider
 __construct ()
 
 setUserId (int $a_val)
 
 getUserId ()
 
 collectActionsForTargetUser (int $a_target_user)
 Collect actions for a target user. More...
 
 getComponentId ()
 
 getActionTypes ()
 
 getJsScripts (string $a_action_type)
 

Data Fields

const JUMP_TO_USER_TALK_LIST = 'etal_jump_to_user_talks'
 

Protected Member Functions

 hasAccess (int $a_target_user)
 

Private Attributes

ilLanguage $language
 
ilCtrl $controlFlow
 
ilMyStaffAccess $access
 

Additional Inherited Members

- Protected Attributes inherited from ilUserActionProvider
int $user_id
 
ilLanguage $lng
 
ilDBInterface $db
 

Detailed Description

Definition at line 25 of file class.EmployeeTalkUserActionProvider.php.

Member Function Documentation

◆ collectActionsForTargetUser()

EmployeeTalkUserActionProvider::collectActionsForTargetUser ( int  $a_target_user)

Definition at line 48 of file class.EmployeeTalkUserActionProvider.php.

References ilUserActionCollection\getInstance(), hasAccess(), and ILIAS\UI\examples\Symbol\Glyph\Language\language().

49  {
51 
52  if ($this->hasAccess($a_target_user)) {
53  $jumpToUserTalkList = new ilUserAction();
54  $jumpToUserTalkList->setType(self::JUMP_TO_USER_TALK_LIST);
55  $jumpToUserTalkList->setText($this->language->txt('mm_org_etal'));
56  $jumpToUserTalkList->setHref($this->controlFlow->getLinkTargetByClass([
57  strtolower(ilDashboardGUI::class),
58  strtolower(ilMyStaffGUI::class),
59  strtolower(ilMStShowUserGUI::class),
60  strtolower(ilEmployeeTalkMyStaffUserGUI::class),
61  ], ControlFlowCommand::INDEX) . "&usr_id=$a_target_user");
62 
63  $actions->addAction($jumpToUserTalkList);
64  }
65 
66  return $actions;
67  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getActionTypes()

EmployeeTalkUserActionProvider::getActionTypes ( )

Definition at line 74 of file class.EmployeeTalkUserActionProvider.php.

References ILIAS\UI\examples\Symbol\Glyph\Language\language().

74  : array
75  {
76  return [
77  self::JUMP_TO_USER_TALK_LIST => $this->language->txt('mm_org_etal')
78  ];
79  }
+ Here is the call graph for this function:

◆ getComponentId()

EmployeeTalkUserActionProvider::getComponentId ( )

Definition at line 69 of file class.EmployeeTalkUserActionProvider.php.

69  : string
70  {
71  return "etal";
72  }

◆ hasAccess()

EmployeeTalkUserActionProvider::hasAccess ( int  $a_target_user)
protected

Definition at line 81 of file class.EmployeeTalkUserActionProvider.php.

References ILIAS\Repository\access().

Referenced by collectActionsForTargetUser().

81  : bool
82  {
83  if (!$a_target_user) {
84  return false;
85  }
86 
87  if (
88  !$this->access->hasCurrentUserAccessToTalks() ||
89  !$this->access->hasCurrentUserAccessToUser($a_target_user)
90  ) {
91  return false;
92  }
93 
94  return true;
95  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilMyStaffAccess EmployeeTalkUserActionProvider::$access
private

Definition at line 31 of file class.EmployeeTalkUserActionProvider.php.

◆ $controlFlow

ilCtrl EmployeeTalkUserActionProvider::$controlFlow
private

Definition at line 30 of file class.EmployeeTalkUserActionProvider.php.

◆ $language

ilLanguage EmployeeTalkUserActionProvider::$language
private

Definition at line 29 of file class.EmployeeTalkUserActionProvider.php.

◆ JUMP_TO_USER_TALK_LIST

const EmployeeTalkUserActionProvider::JUMP_TO_USER_TALK_LIST = 'etal_jump_to_user_talks'

Definition at line 27 of file class.EmployeeTalkUserActionProvider.php.


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