ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilUserUserActionProvider.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/User/Actions/classes/class.ilUserActionProvider.php");
6
15{
19 function getComponentId()
20 {
21 return "user";
22 }
23
27 function getActionTypes()
28 {
29 return array(
30 "profile" => $this->lng->txt("profile")
31 );
32 }
33
40 function collectActionsForTargetUser($a_target_user)
41 {
43 include_once("./Services/User/Actions/classes/class.ilUserAction.php");
44
45 if (!in_array(ilObjUser::_lookupPref($a_target_user, "public_profile"),
46 array("y", "g")))
47 {
48 return $coll;
49 }
50
51 $f = new ilUserAction();
52 $f->setType("profile");
53 $f->setText($this->lng->txt('profile'));
54 $f->setHref("./goto.php?target=usr_".$a_target_user);
55 $coll->addAction($f);
56
57 return $coll;
58 }
59}
60?>
An exception for terminatinating execution or to throw for unit testing.
static _lookupPref($a_usr_id, $a_keyword)
A class that provides a collection of actions on users.
Action that can be performed on a user.
collectActionsForTargetUser($a_target_user)
Collect all actions.
getComponentId()
string component id as defined in services.xml/module.xml
getActionTypes()
array[string] keys must be unique action ids (strings), values should be the names of the actions (fr...