ILIAS  release_7 Revision v7.30-3-g800a261c036
ilUserActionAdminGUI Class Reference

User action administration GUI class. More...

+ Collaboration diagram for ilUserActionAdminGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 setActionContext (ilUserActionContext $a_val=null)
 Set action context. More...
 
 getActionContext ()
 Get action context. More...
 
 executeCommand ()
 Execute command. More...
 
 show ()
 Show. More...
 
 save ()
 Save !!!! note in the future this must depend on the context, currently we only have one. More...
 
 getActions ()
 Get actions, !!!! note in the future this must depend on the context, currently we only have one. More...
 

Protected Attributes

 $ctrl
 
 $tpl
 
 $lng
 
 $action_context
 

Detailed Description

User action administration GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilUserActionAdminGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilUserActionAdminGUI::__construct ( )

Constructor.

Parameters

return

Definition at line 40 of file class.ilUserActionAdminGUI.php.

41 {
42 global $DIC;
43
44 $this->ctrl = $DIC->ctrl();
45 $this->lng = $DIC->language();
46 $this->tpl = $DIC["tpl"];
47 $this->ref_id = (int) $_GET["ref_id"];
48 $this->rbabsystem = $DIC->rbac()->system();
49
50 $this->lng->loadLanguageModule("usr");
51 }
$_GET["client_id"]
global $DIC
Definition: goto.php:24

References $_GET, and $DIC.

Member Function Documentation

◆ executeCommand()

ilUserActionAdminGUI::executeCommand ( )

Execute command.

Definition at line 76 of file class.ilUserActionAdminGUI.php.

77 {
78 $next_class = $this->ctrl->getNextClass($this);
79 $cmd = $this->ctrl->getCmd("show");
80
81 switch ($next_class) {
82 default:
83 if (in_array($cmd, array("show", "save"))) {
84 $this->$cmd();
85 }
86 }
87 }

◆ getActionContext()

ilUserActionAdminGUI::getActionContext ( )

Get action context.

Returns
ilUserActionContext action context

Definition at line 68 of file class.ilUserActionAdminGUI.php.

References $action_context.

◆ getActions()

ilUserActionAdminGUI::getActions ( )

Get actions, !!!! note in the future this must depend on the context, currently we only have one.

Parameters

return

Definition at line 139 of file class.ilUserActionAdminGUI.php.

140 {
141 include_once("./Services/User/Actions/classes/class.ilUserActionProviderFactory.php");
142 include_once("./Services/User/Actions/classes/class.ilUserActionAdmin.php");
143 $data = array();
145 foreach ($p->getActionTypes() as $id => $name) {
146 $data[] = array(
147 "action_comp_id" => $p->getComponentId(),
148 "action_type_id" => $id,
149 "action_type_name" => $name,
151 $this->action_context->getComponentId(),
152 $this->action_context->getContextId(),
153 $p->getComponentId(),
154 $id
155 )
156 );
157 }
158 }
159 //var_dump($data); exit;
160 return $data;
161 }
static lookupActive($a_context_comp, $a_context_id, $a_action_comp, $a_action_type)
Is activated?
static getAllProviders()
Get all action providers.
if($format !==null) $name
Definition: metadata.php:230
$data
Definition: storeScorm.php:23

References $data, $name, ilUserActionProviderFactory\getAllProviders(), and ilUserActionAdmin\lookupActive().

Referenced by save(), and show().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilUserActionAdminGUI::save ( )

Save !!!! note in the future this must depend on the context, currently we only have one.

Definition at line 112 of file class.ilUserActionAdminGUI.php.

113 {
114 if (!$this->rbabsystem->checkAccess("write", $this->ref_id)) {
115 $this->ctrl->redirect($this, "show");
116 }
117
118 //var_dump($_POST); exit;
119 include_once("./Services/User/Actions/classes/class.ilUserActionAdmin.php");
120 foreach ($this->getActions() as $a) {
122 $this->action_context->getComponentId(),
123 $this->action_context->getContextId(),
124 $a["action_comp_id"],
125 $a["action_type_id"],
126 (int) $_POST["active"][$a["action_comp_id"] . ":" . $a["action_type_id"]]
127 );
128 }
129 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
130 $this->ctrl->redirect($this, "show");
131 }
$_POST["username"]
getActions()
Get actions, !!!! note in the future this must depend on the context, currently we only have one.
static activateAction($a_context_comp, $a_context_id, $a_action_comp, $a_action_type, $a_active)
Activate action.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples

References $_POST, Vendor\Package\$a, ilUserActionAdmin\activateAction(), and getActions().

+ Here is the call graph for this function:

◆ setActionContext()

ilUserActionAdminGUI::setActionContext ( ilUserActionContext  $a_val = null)

Set action context.

Parameters
ilUserActionContext$a_valaction context

Definition at line 58 of file class.ilUserActionAdminGUI.php.

59 {
60 $this->action_context = $a_val;
61 }

◆ show()

ilUserActionAdminGUI::show ( )

Show.

Parameters

return

Definition at line 95 of file class.ilUserActionAdminGUI.php.

96 {
97 ilUtil::sendInfo($this->lng->txt("user_actions_activation_info"));
98
99 include_once("./Services/User/Actions/classes/class.ilUserActionAdminTableGUI.php");
100 $tab = new ilUserActionAdminTableGUI(
101 $this,
102 "show",
103 $this->getActions(),
104 $this->rbabsystem->checkAccess("write", $this->ref_id)
105 );
106 $this->tpl->setContent($tab->getHTML());
107 }
TableGUI class for user action administration.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References getActions(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

Field Documentation

◆ $action_context

ilUserActionAdminGUI::$action_context
protected

Definition at line 32 of file class.ilUserActionAdminGUI.php.

Referenced by getActionContext().

◆ $ctrl

ilUserActionAdminGUI::$ctrl
protected

Definition at line 17 of file class.ilUserActionAdminGUI.php.

◆ $lng

ilUserActionAdminGUI::$lng
protected

Definition at line 27 of file class.ilUserActionAdminGUI.php.

◆ $tpl

ilUserActionAdminGUI::$tpl
protected

Definition at line 22 of file class.ilUserActionAdminGUI.php.


The documentation for this class was generated from the following file: