ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 

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 $ilSetting, and ilUserActionProvider\$lng.

25  {
26  global $lng, $ilSetting;
27 
28  $this->wsp_activated = (!$ilSetting->get("disable_personal_workspace"));
29  $lng->loadLanguageModule("wsp");
30  parent::__construct();
31  }
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 57 of file class.ilWorkspaceUserActionProvider.php.

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

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

◆ getActionTypes()

ilWorkspaceUserActionProvider::getActionTypes ( )

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

References array.

45  {
46  return array(
47  "shared_res" => $this->lng->txt("wsp_shared_resources")
48  );
49  }
Create styles array
The data for the language used.

◆ getComponentId()

ilWorkspaceUserActionProvider::getComponentId ( )

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

37  {
38  return "pwsp";
39  }

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: