ILIAS  release_7 Revision v7.30-3-g800a261c036
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 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}
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...