ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilUserUserActionProvider Class Reference

Adds link to profile. More...

+ Inheritance diagram for ilUserUserActionProvider:
+ Collaboration diagram for ilUserUserActionProvider:

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Adds link to profile.

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.ilUserUserActionProvider.php.

Member Function Documentation

◆ collectActionsForTargetUser()

ilUserUserActionProvider::collectActionsForTargetUser (   $a_target_user)

Collect all actions.

Parameters
int$a_target_usertarget user
Returns
ilUserActionCollection collection

Reimplemented from ilUserActionProvider.

Definition at line 40 of file class.ilUserUserActionProvider.php.

41 {
43 include_once("./Services/User/Actions/classes/class.ilUserAction.php");
44
45 if (!in_array(
46 ilObjUser::_lookupPref($a_target_user, "public_profile"),
47 array("y", "g")
48 )) {
49 return $coll;
50 }
51
52 $f = new ilUserAction();
53 $f->setType("profile");
54 $f->setText($this->lng->txt('profile'));
55 $f->setHref("./goto.php?target=usr_" . $a_target_user);
56 $coll->addAction($f);
57
58 return $coll;
59 }
static _lookupPref($a_usr_id, $a_keyword)
Action that can be performed on a user.

References ilObjUser\_lookupPref(), and ilUserActionCollection\getInstance().

+ Here is the call graph for this function:

◆ getActionTypes()

ilUserUserActionProvider::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 27 of file class.ilUserUserActionProvider.php.

28 {
29 return array(
30 "profile" => $this->lng->txt("profile")
31 );
32 }

◆ getComponentId()

ilUserUserActionProvider::getComponentId ( )

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

Reimplemented from ilUserActionProvider.

Definition at line 19 of file class.ilUserUserActionProvider.php.

20 {
21 return "user";
22 }

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