ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilGroupUserActionProvider Class Reference
+ Inheritance diagram for ilGroupUserActionProvider:
+ Collaboration diagram for ilGroupUserActionProvider:

Public Member Functions

 getComponentId ()
 
 getActionTypes ()
 
 collectActionsForTargetUser (int $a_target_user)
 
 getJsScripts (string $a_action_type)
 
- 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)
 

Static Public Member Functions

static getCommandAccess (int $a_user_id)
 

Static Protected Attributes

static $grp_ops = []
 

Additional Inherited Members

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

Detailed Description

Definition at line 21 of file class.ilGroupUserActionProvider.php.

Member Function Documentation

◆ collectActionsForTargetUser()

ilGroupUserActionProvider::collectActionsForTargetUser ( int  $a_target_user)

Definition at line 65 of file class.ilGroupUserActionProvider.php.

References $DIC, Vendor\Package\$f, and ILIAS\Repository\lng().

66  {
67  global $DIC;
68 
69  $ctrl = $DIC->ctrl();
70  $this->lng->loadLanguageModule("grp");
71  $coll = new ilUserActionCollection();
72 
73  $commands = self::getCommandAccess($this->user_id);
74  if (count($commands) == 0) {
75  return $coll;
76  }
77 
78  $f = new ilUserAction();
79  $f->setType("add_to");
80  $f->setText($this->lng->txt("grp_add_to_group"));
81  $f->setHref("#");
82  $ctrl->setParameterByClass("ilGroupAddToGroupActionGUI", "user_id", $a_target_user);
83  $f->setData(array(
84  "grp-action-add-to" => "1",
85  "url" => $ctrl->getLinkTargetByClass(array("ildashboardgui", "ilGroupUserActionsGUI", "ilGroupAddToGroupActionGUI"), "", "", true, false)
86  ));
87  $coll->addAction($f);
88 
89  return $coll;
90  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:22
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()

ilGroupUserActionProvider::getActionTypes ( )

Definition at line 36 of file class.ilGroupUserActionProvider.php.

References ILIAS\Repository\lng().

36  : array
37  {
38  $this->lng->loadLanguageModule("grp");
39 
40  return array(
41  "add_to" => $this->lng->txt("grp_add_to_group")
42  );
43  }
+ Here is the call graph for this function:

◆ getCommandAccess()

static ilGroupUserActionProvider::getCommandAccess ( int  $a_user_id)
static

Definition at line 45 of file class.ilGroupUserActionProvider.php.

References ilUtil\_getObjectsByOperations().

Referenced by ilGroupAddToGroupActionGUI\executeCommand().

45  : array
46  {
47  if (!isset(self::$grp_ops[$a_user_id])) {
48  $ops = array();
49  $o = ilUtil::_getObjectsByOperations(array("root", "crs", "cat"), "create_grp", $a_user_id, 1);
50  if (count($o) > 0) {
51  $ops[] = "create_grp";
52  }
53  $o = ilUtil::_getObjectsByOperations("grp", "manage_members", $a_user_id, 1);
54  if (count($o) > 0) {
55  $ops[] = "manage_members";
56  }
57  self::$grp_ops[$a_user_id] = $ops;
58  }
59  return self::$grp_ops[$a_user_id];
60  }
static _getObjectsByOperations( $a_obj_type, string $a_operation, int $a_usr_id=0, int $limit=0)
Get all objects of a specific type and check access This function is not recursive, instead it parses the serialized rbac_pa entries.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getComponentId()

ilGroupUserActionProvider::getComponentId ( )

Definition at line 28 of file class.ilGroupUserActionProvider.php.

28  : string
29  {
30  return "grp";
31  }

◆ getJsScripts()

ilGroupUserActionProvider::getJsScripts ( string  $a_action_type)

Definition at line 95 of file class.ilGroupUserActionProvider.php.

References $DIC, ilExplorerBaseGUI\getLocalExplorerJsPath(), and ilExplorerBaseGUI\getLocalJsTreeJsPath().

95  : array
96  {
97  global $DIC;
98  $gui = $DIC->repository()->internal()->gui();
99  switch ($a_action_type) {
100  case "add_to":
101  return array(
102  "assets/js/GroupUserActions.js",
103  "assets/js/modal.min.js",
106  );
107  }
108  return array();
109  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Field Documentation

◆ $grp_ops

ilGroupUserActionProvider::$grp_ops = []
staticprotected

Definition at line 23 of file class.ilGroupUserActionProvider.php.


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