36 $this->tpl = $DIC[
"tpl"];
37 $this->
ctrl = $DIC->ctrl();
38 $this->
user = $DIC->user();
39 $this->
lng = $DIC->language();
46 $next_class = $this->
ctrl->getNextClass($this);
49 $cmd = $this->
ctrl->getCmd();
51 switch ($next_class) {
67 if (!$exp->handleCommand()) {
89 if (!$exp->handleCommand()) {
106 bool $a_insert =
false 112 $form->setFormAction($ilCtrl->getFormAction($this));
114 $form->setTitle($this->
lng->txt(
"cont_insert_skills"));
116 $form->setTitle($this->
lng->txt(
"cont_update_skills"));
123 foreach ($skills as $skill) {
124 $options[$skill[
"skill_node_id"]] = $skill[
"title"];
128 $this->tpl->setOnScreenMessage(
'failure',
"cont_no_skills");
131 $obj->setRequired(
true);
132 $obj->setOptions($options);
133 $form->addItem($obj);
136 $form->addCommandButton(
"create_skill", $this->
lng->txt(
"select"));
137 $form->addCommandButton(
"cancelCreate", $this->
lng->txt(
"cancel"));
139 $obj->setValue($this->content_obj->getSkillId());
140 $form->addCommandButton(
"update", $this->
lng->txt(
"select"));
141 $form->addCommandButton(
"cancelUpdate", $this->
lng->txt(
"cancel"));
154 if ($this->
getPageConfig()->getEnablePCType(
"PlaceHolder")) {
155 $data = $this->request->getInt(
"skill_id");
161 if ($form->checkInput()) {
162 $data = $form->getInput(
"skill_id");
169 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
170 $this->content_obj->setData(
$data);
171 $this->updated = $this->pg_obj->update();
172 if ($this->updated ===
true) {
173 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
177 $form->setValuesByPost();
188 if ($this->
getPageConfig()->getEnablePCType(
"PlaceHolder")) {
189 $data = $this->request->getInt(
"skill_id");
195 if ($form->checkInput()) {
196 $data = $form->getInput(
"skill_id");
202 $this->content_obj->setData(
$data);
203 $this->updated = $this->pg_obj->update();
204 if ($this->updated ===
true) {
205 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
209 $this->pg_obj->addHierIDs();
210 $form->setValuesByPost();
edit(ilPropertyFormGUI $a_form=null)
initForm(bool $a_insert=false)
Init skills form.
Explorer for selecting a personal skill.
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
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...
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
setContent(string $a_html)
Sets content for standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
ilGlobalTemplateInterface $tpl
static getSelectedUserSkills(int $a_user_id)
insert(ilPropertyFormGUI $a_form=null)
__construct(Container $dic, ilPlugin $plugin)