◆ __construct()
ilSingleUserShareGUI::__construct |
( |
|
$wsp_access_handler = null , |
|
|
|
$wsp_node_id = null |
|
) |
| |
Definition at line 16 of file class.ilSingleUserShareGUI.php.
References $DIC.
20 $this->tpl = $DIC[
'tpl'];
21 $this->ctrl = $DIC[
'ilCtrl'];
22 $this->lng = $DIC[
'lng'];
25 $this->wsp_access_handler = $wsp_access_handler;
26 $this->wsp_node_id = $wsp_node_id;
◆ cancel()
ilSingleUserShareGUI::cancel |
( |
| ) |
|
◆ executeCommand()
ilSingleUserShareGUI::executeCommand |
( |
| ) |
|
Definition at line 29 of file class.ilSingleUserShareGUI.php.
31 $forward_class = $this->ctrl->getNextClass($this);
33 switch ($forward_class) {
35 if (!($cmd = $this->ctrl->getCmd())) {
36 $cmd =
"initShareForm";
◆ getShareForm()
ilSingleUserShareGUI::getShareForm |
( |
| ) |
|
Definition at line 52 of file class.ilSingleUserShareGUI.php.
References $form, and ilTextInputGUI\setSize().
Referenced by initShareForm(), and saveShare().
54 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
57 $form->setTitle($this->lng->txt(
"share_content"));
58 $form->setId(
'share_usr');
60 $form->setFormAction($this->ctrl->getFormAction($this,
'saveShare'));
66 $form->addCommandButton(
'saveShare', $this->lng->txt(
"share"));
67 $form->addCommandButton(
'cancel', $this->lng->txt(
"cancel"));
if(isset($_POST['submit'])) $form
setSize($a_size)
Set Size.
This class represents a text property in a property form.
◆ initShareForm()
◆ saveShare()
ilSingleUserShareGUI::saveShare |
( |
| ) |
|
|
protected |
Definition at line 72 of file class.ilSingleUserShareGUI.php.
References $form, ilObjUser\_lookupId(), getShareForm(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\sendSuccess().
76 if (
$form->checkInput()) {
78 $existing = $this->wsp_access_handler->getPermissions($this->wsp_node_id);
80 if (!in_array($user_id, $existing)) {
81 $this->wsp_access_handler->addPermission($this->wsp_node_id, $user_id);
86 $this->ctrl->returnToParent($this);
91 $this->ctrl->redirect($this);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupId($a_user_str)
Lookup id by login.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_POST['submit'])) $form
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ $ctrl
ilSingleUserShareGUI::$ctrl |
|
protected |
◆ $lng
ilSingleUserShareGUI::$lng |
|
protected |
◆ $tpl
ilSingleUserShareGUI::$tpl |
|
protected |
The documentation for this class was generated from the following file: