ILIAS  release_7 Revision v7.30-3-g800a261c036
ilWorkspaceUserActionProvider Class Reference

Adds link to shared resources. More...

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

Public Member Functions

 __construct ()
 Construct. More...
 
 getComponentId ()
 
Returns
string component id as defined in services.xml/module.xml
More...
 
 getActionTypes ()
 
Returns
array[string] keys must be unique action ids (strings), values should be the names of the actions (from ilLanguage)
More...
 
 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

return

Reimplemented from ilUserActionProvider.

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

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");
34 }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilSetting
Definition: privfeed.php:17

References $DIC, $ilSetting, ilUserActionProvider\$lng, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ collectActionsForTargetUser()

ilWorkspaceUserActionProvider::collectActionsForTargetUser (   $a_target_user)

Collect all actions.

Parameters
int$a_target_usertarget user
Returns
ilUserActionCollection collection

Reimplemented from ilUserActionProvider.

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

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("ildashboardgui", "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
Action that can be performed on a user.

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

+ Here is the call graph for this function:

◆ getActionTypes()

ilWorkspaceUserActionProvider::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 47 of file class.ilWorkspaceUserActionProvider.php.

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

◆ getComponentId()

ilWorkspaceUserActionProvider::getComponentId ( )

Returns
string component id as defined in services.xml/module.xml

Reimplemented from ilUserActionProvider.

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: