3 declare(strict_types=1);
    53         $this->
http = $DIC->http();
    56         $this->
lng = $DIC->language();
    57         $this->
lng->loadLanguageModule(
'ps');
    60         $this->tpl = $DIC->ui()->mainTemplate();
    61         $this->
ctrl = $DIC->ctrl();
    62         $this->tabs_gui = $DIC->tabs();
    63         $this->errorHandling = $DIC[
'ilErr'];
    64         $this->accessHandler = $DIC->access();
    65         $this->toolbarGUI = $DIC->toolbar();
    66         $this->
user = $DIC->user();
    67         $this->obj_id = $a_obj_id;
    71         $this->ref_id = end($refs);
    76         if ($this->
http->wrapper()->query()->has(
'member_id')) {
    77             return $this->
http->wrapper()->query()->retrieve(
    87         if ($this->
http->wrapper()->query()->has(
'field_id')) {
    88             return $this->
http->wrapper()->query()->retrieve(
    98         if ($this->
http->wrapper()->post()->has(
'required')) {
    99             return $this->
http->wrapper()->post()->retrieve(
   101                 $this->
refinery->kindlyTo()->dictOf(
   111         if (!$this->accessHandler->checkAccess(
'write', 
'', $this->ref_id)) {
   112             $this->errorHandling->raiseError($this->
lng->txt(
'permission_denied'), $this->errorHandling->WARNING);
   115         $cmd = $this->
ctrl->getCmd();
   116         switch ($next_class = $this->
ctrl->getNextClass($this)) {
   131     protected function show(): void
   134             $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'ps_cdf_warning_modify'));
   141         $this->toolbarGUI->addButton(
   142             $this->
lng->txt(
'ps_cdf_add_field'),
   143             $this->
ctrl->getLinkTarget($this, 
'addField')
   147         $this->tpl->setContent($table->getHTML());
   153         foreach ($fields as $field_obj) {
   155             $field_obj->update();
   159         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'));
   166         if ($this->
http->wrapper()->post()->has(
'field_ids')) {
   167             $field_ids = $this->
http->wrapper()->post()->retrieve(
   169                 $this->
refinery->kindlyTo()->listOf(
   175         if (!count($field_ids)) {
   176             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'ps_cdf_select_one'));
   181         $confirm->setFormAction($this->
ctrl->getFormAction($this));
   182         $confirm->setHeaderText($this->
lng->txt(
'ps_cdf_delete_sure'));
   184         foreach ($field_ids as $field_id) {
   187             $confirm->addItem(
'field_ids[]', (
string) $field_id, $tmp_field->getName());
   190         $confirm->setConfirm($this->
lng->txt(
'delete'), 
'deleteFields');
   191         $confirm->setCancel($this->
lng->txt(
'cancel'), 
'listFields');
   192         $this->tpl->setContent($confirm->getHTML());
   198         if ($this->
http->wrapper()->post()->has(
'field_ids')) {
   199             $field_ids = $this->
http->wrapper()->post()->retrieve(
   201                 $this->
refinery->kindlyTo()->listOf(
   207         foreach ($field_ids as $field_id) {
   209             $tmp_field->delete();
   214         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'ps_cdf_deleted'));
   221         $this->
form->getItemByPostVar(
'va')->setValues(array(
''));
   222         $this->tpl->setContent($this->
form->getHTML());
   228         if ($this->
form->checkInput()) {
   230             $udf->setName((
string) $this->
form->getInput(
'na'));
   231             $udf->setType((
int) $this->
form->getInput(
'ty'));
   232             $udf->setValues($udf->prepareValues($this->form->getInput(
'va')));
   233             $udf->setValueOptions($this->
form->getItemByPostVar(
'va')->getOpenAnswerIndexes()); 
   234             $udf->enableRequired((
bool) $this->
form->getInput(
're'));
   237             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'ps_cdf_added_field'));
   244         $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
   245         $this->
form->setValuesByPost();
   246         $this->tpl->setContent($this->
form->getHTML());
   258         $this->
form->getItemByPostVar(
'na')->setValue($udf->getName());
   259         $this->
form->getItemByPostVar(
'ty')->setValue((
string) $udf->getType());
   260         $this->
form->getItemByPostVar(
're')->setChecked($udf->isRequired());
   261         $this->
form->getItemByPostVar(
'va')->setValues($udf->getValues());
   262         $this->
form->getItemByPostVar(
'va')->setOpenAnswerIndexes($udf->getValueOptions());
   263         $this->tpl->setContent($this->
form->getHTML());
   269         if ($this->
form->checkInput()) {
   271             $udf->setName($this->
form->getInput(
'na'));
   272             $udf->setType((
int) $this->
form->getInput(
'ty'));
   273             $prepared = $udf->prepareValues($this->
form->getInput(
'va'));
   274             $udf->setValues($prepared);
   275             $udf->setValueOptions($this->
form->getItemByPostVar(
'va')->getOpenAnswerIndexes());
   276             $udf->enableRequired((
bool) $this->
form->getInput(
're'));
   281             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'));
   286         $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
   287         $this->
form->setValuesByPost();
   288         $this->tpl->setContent($this->
form->getHTML());
   296         $this->
form = 
new ilPropertyFormGUI();
   299             case self::MODE_CREATE:
   300                 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
   301                 $this->
form->setTitle($this->
lng->txt(
'ps_cdf_add_field'));
   302                 $this->
form->addCommandButton(
'saveField', $this->
lng->txt(
'save'));
   303                 $this->
form->addCommandButton(
'listFields', $this->
lng->txt(
'cancel'));
   306             case self::MODE_UPDATE:
   308                 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
   309                 $this->
form->setTitle($this->
lng->txt(
'ps_cdf_edit_field'));
   310                 $this->
form->addCommandButton(
'updateField', $this->
lng->txt(
'save'));
   311                 $this->
form->addCommandButton(
'listFields', $this->
lng->txt(
'cancel'));
   318         $na->setMaxLength(255);
   319         $na->setRequired(
true);
   320         $this->
form->addItem($na);
   325         $this->
form->addItem($ty);
   327         if ($a_mode === self::MODE_UPDATE) {
   328             $ty->setDisabled(
true); 
   333         $ty->addOption($ty_te);
   337         $ty->addOption($ty_se);
   342         $ty_se_mu->setRequired(
true);
   343         $ty_se_mu->setSize(32);
   344         $ty_se_mu->setMaxLength(128);
   345         $ty_se->addSubItem($ty_se_mu);
   350         $this->
form->addItem($re);
   357         $this->
ctrl->saveParameter($this, 
'member_id');
   359         $this->tabs_gui->clearTargets();
   360         $this->tabs_gui->clearSubTabs();
   361         $this->tabs_gui->setBackTarget(
   362             $this->
lng->txt(
'back'),
   363             $this->
ctrl->getLinkTarget($this, 
'cancelEditMember')
   366             $this->tpl->setContent($form->
getHTML());
   375         $this->tpl->setContent($form->
getHTML());
   380         $this->
ctrl->returnToParent($this);
   390         $title .= (
': ' . $name[
'lastname'] . 
', ' . $name[
'firstname']);
   407         $this->
ctrl->saveParameter($this, 
'member_id');
   414             $history->setUpdateUser($this->
user->getId());
   418             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'), 
true);
   419             $this->
ctrl->returnToParent($this);
   424         $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
 
Interface GlobalHttpState. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _hasAgreementsByObjId(int $a_obj_id)
Check if there is any user agreement. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _getAllReferences(int $id)
get all reference ids for object ID 
 
static _lookupName(int $a_user_id)
lookup user name 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _getFields(int $a_container_id, $a_sort=self::IL_CDF_SORT_NAME)
Get all fields of a container. 
 
static addCustomFields(ilPropertyFormGUI $form, int $a_obj_id, string $a_type, string $a_mode='user')
 
ilAccessHandler $accessHandler
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
initRequiredStatusFromPost()
 
static http()
Fetches the global http state from ILIAS. 
 
initFieldForm(int $a_mode)
 
setAllowMove(bool $a_allow_move)
 
static saveCourseDefinedFields(ilPropertyFormGUI $form, int $a_obj_id, int $a_usr_id=0)
 
static _deleteByObjId(int $a_obj_id)
Delete all entries by obj_id. 
 
editMember(?ilPropertyFormGUI $form=null)
 
ilGlobalTemplateInterface $tpl
 
form( $class_path, string $cmd, string $submit_caption="")
 
Error Handling & global info handling. 
 
static setCourseDefinedFieldValues(ilPropertyFormGUI $form, int $a_obj_id, int $a_usr_id=0)
 
ilErrorHandling $errorHandling
 
static _lookupType(int $id, bool $reference=false)
 
__construct(int $a_obj_id)