ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilUserActionAdminGUI Class Reference

User action administration GUI class. More...

+ Collaboration diagram for ilUserActionAdminGUI:

Public Member Functions

 __construct ()
 Constructor. 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
 

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

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

References $DIC.

37  {
38  global $DIC;
39 
40  $this->ctrl = $DIC->ctrl();
41  $this->lng = $DIC->language();
42  $this->tpl = $DIC["tpl"];
43 
44  $this->lng->loadLanguageModule("usr");
45 
46  }
global $DIC

Member Function Documentation

◆ executeCommand()

ilUserActionAdminGUI::executeCommand ( )

Execute command.

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

References $cmd, and array.

52  {
53  $next_class = $this->ctrl->getNextClass($this);
54  $cmd = $this->ctrl->getCmd("show");
55 
56  switch ($next_class)
57  {
58  default:
59  if (in_array($cmd, array("show", "save")))
60  {
61  $this->$cmd();
62  }
63  }
64  }
$cmd
Definition: sahs_server.php:35
Create styles array
The data for the language used.

◆ getActions()

ilUserActionAdminGUI::getActions ( )

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

Parameters

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

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

Referenced by save(), and show().

104  {
105  include_once("./Services/User/Actions/classes/class.ilUserActionProviderFactory.php");
106  include_once("./Services/User/Actions/classes/class.ilUserActionAdmin.php");
107  $data = array();
109  {
110  foreach ($p->getActionTypes() as $id => $name)
111  {
112  $data[] = array(
113  "action_comp_id" => $p->getComponentId(),
114  "action_type_id" => $id,
115  "action_type_name" => $name,
116  "active" => ilUserActionAdmin::lookupActive("awrn", "toplist", $p->getComponentId(), $id)
117  );
118  }
119  }
120  //var_dump($data); exit;
121  return $data;
122  }
static getAllProviders()
Get all action providers.
static lookupActive($a_context_comp, $a_context_id, $a_action_comp, $a_action_type)
Is activated?
Create styles array
The data for the language used.
+ 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 84 of file class.ilUserActionAdminGUI.php.

References $_POST, ilUserActionAdmin\activateAction(), getActions(), and ilUtil\sendSuccess().

85  {
86  //var_dump($_POST); exit;
87  include_once("./Services/User/Actions/classes/class.ilUserActionAdmin.php");
88  foreach ($this->getActions() as $a)
89  {
90  ilUserActionAdmin::activateAction("awrn", "toplist", $a["action_comp_id"], $a["action_type_id"],
91  (int)$_POST["active"][$a["action_comp_id"] . ":" . $a["action_type_id"]]);
92  }
93  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
94  $this->ctrl->redirect($this, "show");
95  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static activateAction($a_context_comp, $a_context_id, $a_action_comp, $a_action_type, $a_active)
Activate action.
$_POST["username"]
getActions()
Get actions, !!!! note in the future this must depend on the context, currently we only have one...
+ Here is the call graph for this function:

◆ show()

ilUserActionAdminGUI::show ( )

Show.

Parameters

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

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

73  {
74  ilUtil::sendInfo($this->lng->txt("user_actions_activation_info"));
75 
76  include_once("./Services/User/Actions/classes/class.ilUserActionAdminTableGUI.php");
77  $tab = new ilUserActionAdminTableGUI($this, "show", $this->getActions());
78  $this->tpl->setContent($tab->getHTML());
79  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
TableGUI class for user action administration.
getActions()
Get actions, !!!! note in the future this must depend on the context, currently we only have one...
+ Here is the call graph for this function:

Field Documentation

◆ $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: