ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  public function getComponentId()
20  {
21  return "user";
22  }
23 
27  public function getActionTypes()
28  {
29  return array(
30  "profile" => $this->lng->txt("profile")
31  );
32  }
33 
40  public function collectActionsForTargetUser($a_target_user)
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  }
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.