ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilWorkspaceUserActionProvider Class Reference

Adds link to shared resources. More...

+ Inheritance diagram for ilWorkspaceUserActionProvider:
+ Collaboration diagram for ilWorkspaceUserActionProvider:

Public Member Functions

 __construct ()
 Construct. More...
 
 getComponentId ()
 
 getActionTypes ()
 
 collectActionsForTargetUser ($a_target_user)
 Collect all actions. More...
 
- Public Member Functions inherited from ilUserActionProvider
 __construct ()
 Constructor. More...
 
 setUserId ($a_val)
 Set user id. More...
 
 getUserId ()
 Get user id. More...
 
 collectActionsForTargetUser ($a_target_user)
 Collect actions for a target user. More...
 
 getComponentId ()
 
 getActionTypes ()
 
 getJsScripts ($a_action_type)
 Get js scripts. More...
 
 getCssFiles ($a_action_type)
 Get css resource files. More...
 

Protected Attributes

 $wsp_activated
 
- Protected Attributes inherited from ilUserActionProvider
 $user_id
 
 $lng
 
 $db
 

Detailed Description

Adds link to shared resources.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 14 of file class.ilWorkspaceUserActionProvider.php.

Constructor & Destructor Documentation

◆ __construct()

ilWorkspaceUserActionProvider::__construct ( )

Construct.

Parameters

Definition at line 24 of file class.ilWorkspaceUserActionProvider.php.

References $DIC, $ilSetting, and ilUserActionProvider\$lng.

25  {
26  global $DIC;
27 
28  $lng = $DIC['lng'];
29  $ilSetting = $DIC['ilSetting'];
30 
31  $this->wsp_activated = (!$ilSetting->get("disable_personal_workspace"));
32  $lng->loadLanguageModule("wsp");
33  parent::__construct();
34  }
global $DIC
Definition: saml.php:7
global $ilSetting
Definition: privfeed.php:17

Member Function Documentation

◆ collectActionsForTargetUser()

ilWorkspaceUserActionProvider::collectActionsForTargetUser (   $a_target_user)

Collect all actions.

Parameters
int$a_target_usertarget user
Returns
ilUserActionCollection collection

Definition at line 60 of file class.ilWorkspaceUserActionProvider.php.

References $DIC, $f, $ilCtrl, ilUserActionProvider\$lng, ilObjUser\_lookupLogin(), and ilUserActionCollection\getInstance().

61  {
62  global $DIC;
63 
64  $ilCtrl = $DIC['ilCtrl'];
65  $lng = $DIC['lng'];
66 
68  include_once("./Services/User/Actions/classes/class.ilUserAction.php");
69 
70  if (!$this->wsp_activated) {
71  return $coll;
72  }
73 
74  $f = new ilUserAction();
75  $f->setType("shared_res");
76  $f->setText($lng->txt("wsp_shared_resources"));
77  $ilCtrl->setParameterByClass("ilobjworkspacerootfoldergui", "user", ilObjUser::_lookupLogin($a_target_user));
78  $f->setHref($ilCtrl->getLinkTargetByClass(
79  array("ilpersonaldesktopgui", "ilpersonalworkspacegui", "ilobjworkspacerootfoldergui"),
80  "listSharedResourcesOfOtherUser"
81  ));
82 
83  //$f->setData(array("test" => "you", "user" => $a_target_user));
84 
85  $coll->addAction($f);
86 
87  return $coll;
88  }
static _lookupLogin($a_user_id)
lookup login
static getInstance()
Get instance.
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
Action that can be performed on a user.
+ Here is the call graph for this function:

◆ getActionTypes()

ilWorkspaceUserActionProvider::getActionTypes ( )

Definition at line 47 of file class.ilWorkspaceUserActionProvider.php.

48  {
49  return array(
50  "shared_res" => $this->lng->txt("wsp_shared_resources")
51  );
52  }

◆ getComponentId()

ilWorkspaceUserActionProvider::getComponentId ( )

Definition at line 39 of file class.ilWorkspaceUserActionProvider.php.

40  {
41  return "pwsp";
42  }

Field Documentation

◆ $wsp_activated

ilWorkspaceUserActionProvider::$wsp_activated
protected

Definition at line 16 of file class.ilWorkspaceUserActionProvider.php.


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