ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilWorkspaceUserActionProvider Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct ()
 
 getComponentId ()
 
 getActionTypes ()
 
 collectActionsForTargetUser (int $a_target_user)
 Collect actions for a target user. More...
 
- 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)
 

Protected Attributes

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

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Adds link to shared resources

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilWorkspaceUserActionProvider::__construct ( )

Reimplemented from ilUserActionProvider.

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

28 {
29 global $DIC;
30
31 $lng = $DIC['lng'];
32 $ilSetting = $DIC['ilSetting'];
33
34 $this->wsp_activated = (!$ilSetting->get("disable_personal_workspace"));
35 $lng->loadLanguageModule("wsp");
37 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilSetting
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ collectActionsForTargetUser()

ilWorkspaceUserActionProvider::collectActionsForTargetUser ( int  $a_target_user)

Collect actions for a target user.

Reimplemented from ilUserActionProvider.

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

55 {
56 global $DIC;
57
58 $ilCtrl = $DIC['ilCtrl'];
59 $lng = $DIC['lng'];
60
61 $coll = new ilUserActionCollection();
62
63 if (!$this->wsp_activated) {
64 return $coll;
65 }
66
67 $f = new ilUserAction();
68 $f->setType("shared_res");
69 $f->setText($lng->txt("wsp_shared_resources"));
70 $ilCtrl->setParameterByClass("ilobjworkspacerootfoldergui", "user", ilObjUser::_lookupLogin($a_target_user));
71 $ilCtrl->setParameterByClass("ilobjworkspacerootfoldergui", "shr_id", $a_target_user);
72 $f->setHref($ilCtrl->getLinkTargetByClass(
73 ["ildashboardgui", "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(int $a_user_id)
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 $DIC, Vendor\Package\$f, ilUserActionProvider\$lng, and ilObjUser\_lookupLogin().

+ Here is the call graph for this function:

◆ getActionTypes()

ilWorkspaceUserActionProvider::getActionTypes ( )
Returns
array<string,string>

Reimplemented from ilUserActionProvider.

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

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

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ 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.

39 : string
40 {
41 return "pwsp";
42 }

Field Documentation

◆ $wsp_activated

bool ilWorkspaceUserActionProvider::$wsp_activated
protected

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


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