ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
EmployeeTalkUserActionProvider Class Reference
+ Inheritance diagram for EmployeeTalkUserActionProvider:
+ Collaboration diagram for EmployeeTalkUserActionProvider:

Public Member Functions

 collectActionsForTargetUser (int $a_target_user)
 Collect actions for a target user. More...
 
 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 string 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
 
Language $lng
 
ilDBInterface $db
 

Detailed Description

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

Member Function Documentation

◆ collectActionsForTargetUser()

EmployeeTalkUserActionProvider::collectActionsForTargetUser ( int  $a_target_user)

Collect actions for a target user.

Reimplemented from ilUserActionProvider.

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

49 {
50 $actions = new ilUserActionCollection();
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...

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

+ Here is the call graph for this function:

◆ getActionTypes()

EmployeeTalkUserActionProvider::getActionTypes ( )
Returns
array[string] keys must be unique action ids (strings), values should be the names of the actions (from ilLanguage)

Reimplemented from ilUserActionProvider.

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

74 : array
75 {
76 return [
77 self::JUMP_TO_USER_TALK_LIST => $this->language->txt('mm_org_etal')
78 ];
79 }

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

+ Here is the call graph for this function:

◆ getComponentId()

EmployeeTalkUserActionProvider::getComponentId ( )
Returns
string component id as defined in services.xml/module.xml

Reimplemented from ilUserActionProvider.

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.

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 }

References ILIAS\Repository\access().

Referenced by collectActionsForTargetUser().

+ 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 string 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: