ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilUserUserActionProvider.php
Go to the documentation of this file.
1<?php
2
24{
25 public function getComponentId(): string
26 {
27 return "user";
28 }
29
33 public function getActionTypes(): array
34 {
35 return [
36 "profile" => $this->lng->txt("profile")
37 ];
38 }
39
40 public function collectActionsForTargetUser(int $a_target_user): ilUserActionCollection
41 {
42 $coll = new ilUserActionCollection();
43
44 if (!in_array(
45 ilObjUser::_lookupPref($a_target_user, "public_profile"),
46 ["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}
static _lookupPref(int $a_usr_id, string $a_keyword)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A class that provides a collection of actions on users.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
collectActionsForTargetUser(int $a_target_user)
Collect actions for a target user.