16 public function __construct($wsp_access_handler = null, $wsp_node_id = null)
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;
31 $forward_class = $this->ctrl->getNextClass($this);
33 switch($forward_class)
36 if (!(
$cmd = $this->ctrl->getCmd()))
38 $cmd =
"initShareForm";
52 $this->tpl->setContent($form->getHTML());
57 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
60 $form->setTitle($this->lng->txt(
"share_content"));
61 $form->setId(
'share_usr');
63 $form->setFormAction($this->ctrl->getFormAction($this,
'saveShare'));
69 $form->addCommandButton(
'saveShare', $this->lng->txt(
"share"));
70 $form->addCommandButton(
'cancel', $this->lng->txt(
"cancel"));
79 if($form->checkInput())
83 $existing = $this->wsp_access_handler->getPermissions($this->wsp_node_id);
85 if(!in_array($user_id, $existing))
87 $this->wsp_access_handler->addPermission($this->wsp_node_id, $user_id);
94 $this->ctrl->returnToParent($this);
101 $this->ctrl->redirect($this);
106 $this->ctrl->returnToParent($this);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initShareForm(ilPropertyFormGUI $form=null)
static _lookupId($a_user_str)
Lookup id by login.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
__construct($wsp_access_handler=null, $wsp_node_id=null)