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 
5 include_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 ?>
A class that provides a collection of actions on users.
static getInstance()
Get instance.
collectActionsForTargetUser($a_target_user)
Collect all actions.
Create styles array
The data for the language used.
static _lookupPref($a_usr_id, $a_keyword)
Action that can be performed on a user.