16        $r = $this->
http()->request();
 
   17        switch ($this->ctrl()->getNextClass()) {
 
   18            case strtolower(ilRepositorySearchGUI::class):
 
   19                switch ($this->ctrl()->getCmd()) {
 
   20                    case 'addUserFromAutoComplete':
 
   21                        if (
$r->getQueryParams()[
'addusertype'] == 
"staff") {
 
   27                        $this->ctrl()->forwardCommand($repo);
 
   33                parent::executeCommand();
 
   44        $this->ctrl()->setParameterByClass(ilRepositorySearchGUI::class, 
'addusertype', 
'staff');
 
   46            'auto_complete_name' => $this->txt(
'user'),
 
   47            'user_type'          => $types,
 
   48            'submit_name'        => $this->txt(
'add'),
 
   55            $html .= $ilOrgUnitUserAssignmentTableGUI->getHTML();
 
   61    protected function confirm()
 
   63        $this->ctrl()->saveParameter($this, 
'position_id');
 
   64        $r = $this->
http()->request();
 
   70        $confirmation->setFormAction($this->ctrl()->getFormAction($this));
 
   71        $confirmation->setCancel($this->txt(self::CMD_CANCEL), self::CMD_CANCEL);
 
   72        $confirmation->setConfirm($this->txt(
'remove_user'), self::CMD_DELETE);
 
   73        $confirmation->setHeaderText(
sprintf($this->txt(
'msg_confirm_remove_user'), $ilOrgUnitPosition->getTitle()));
 
   80    protected function delete()
 
   82        $r = $this->
http()->request();
 
   84                                            ->getAssignmentOrFail(
$_POST[
'usr_id'], 
$r->getQueryParams()[
'position_id'], $this->getParentRefId());
 
   93        $this->ctrl()->redirect($this, self::CMD_INDEX);
 
   99        if (!$this->dic()->access()->checkAccess(
"write", 
"", $this->
getParentRefId())) {
 
  101            $this->ctrl()->redirect($this, self::CMD_INDEX);
 
  106        foreach (
$users as $user) {
 
  109                $user_ids[] = $user_id;
 
  113        if (!count($user_ids)) {
 
  115            $this->ctrl()->redirect($this, self::CMD_INDEX);
 
  118        $position_id = isset(
$_POST[
'user_type']) ? 
$_POST[
'user_type'] : 0;
 
  120        if (!$position_id && !$position = ilOrgUnitPosition::find($position_id)) {
 
  122            $this->ctrl()->redirect($this, self::CMD_INDEX);
 
  124        foreach ($user_ids as $user_id) {
 
  129        $this->ctrl()->redirect($this, self::CMD_INDEX);
 
sprintf('%.4f', $callTime)
static findOrFail($primary_key, array $add_constructor_args=array())
Tries to find the object and throws an Exception if object is not found, instead of returning null.
static getArray($key=null, $values=null)
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
static _lookupLogin($a_user_id)
lookup login
static _lookupId($a_user_str)
Lookup id by login.
static getActiveForPosition($orgu_ref_id)
Class ilOrgUnitUserAssignmentGUI.
Class ilOrgUnitUserAssignmentTableGUI.
static findOrCreateAssignment($user_id, $position_id, $orgu_id)
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static http()
Fetches the global http state from ILIAS.