32 protected \ILIAS\DI\UIServices
$ui;
43 $this->
ctrl = $DIC->ctrl();
44 $this->
ui = $DIC->ui();
45 $this->http_request = $DIC->http()->request();
46 $this->port_request = $DIC->portfolio()
52 $this->
lng->loadLanguageModule(
"prtt");
53 $this->
lng->loadLanguageModule(
"prtf");
59 $next_class = $this->
ctrl->getNextClass($this);
62 $cmd = $this->
ctrl->getCmd();
64 switch ($next_class) {
66 case "ilpropertyformgui":
68 $this->
ctrl->forwardCommand($form);
79 return ($this->
getPage()->getParentType() ===
"prtt");
94 public function edit(): void
123 $selected = $this->content_obj->getRecordIds();
127 foreach ($recs as $r) {
128 $val = (in_array($r->getRecordId(), $selected));
129 $fields[
"rec" . $r->getRecordId()] =
130 $f->input()->field()->checkbox($r->getTitle(), $r->getDescription())
135 $section1 =
$f->input()->field()->section($fields, $this->
lng->txt(
"prtt_select_datasets"));
142 return $f->input()->container()->form()->standard($form_action, [
"sec" => $section1]);
152 if (
$request->getMethod() ===
"POST") {
153 $form = $form->withRequest(
$request);
154 $data = $form->getData();
155 if (is_null(
$data)) {
159 if (is_array(
$data[
"sec"])) {
161 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
163 $this->updated = $this->pg_obj->update();
164 if (!$this->updated) {
168 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"msg_obj_modified"),
true);
171 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
176 $data = $form->getData();
178 if (!is_null(
$data) && is_array(
$data[
"sec"])) {
181 foreach ($recs as $r) {
182 $rec_id =
$data[
"sec"][
"rec" . $r->getRecordId()];
183 if (isset($rec_id) && $rec_id) {
184 $ids[] = $r->getRecordId();
212 if (
$request->getMethod() ===
"POST") {
213 $form = $form->withRequest(
$request);
214 $data = $form->getData();
215 if (is_null(
$data)) {
219 if (is_array(
$data[
"sec"])) {
221 $this->updated = $this->pg_obj->update();
222 if (!$this->updated) {
226 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"msg_obj_modified"),
true);
229 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
256 $page =
new ilPortfolioPage($this->port_request->getPortfolioPageId());
258 $content_obj = $page->getContentObjectForPcId($this->request->getPCId());
269 foreach ($recs as $r) {
270 $val = (in_array($r->getRecordId(), $selected));
276 $form->setTitle(
$lng->
txt(
"prtf_edit_data"));
281 $this->
getPage()->getPortfolioId(),
286 $this->record_gui->setRecordFilter($selected);
287 $this->record_gui->setPropertyForm($form);
288 $this->record_gui->parse();
290 $form->addCommandButton(
"updateAdvancedMetaData",
$lng->
txt(
"save"));
291 $form->addCommandButton(
"cancel",
$lng->
txt(
"cancel"));
304 if (!$this->record_gui->importEditFormPostValues()) {
309 if ($this->record_gui->writeEditForm()) {
310 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"settings_saved"),
true);
312 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
ilPageContent $content_obj
buildDom(bool $a_force=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
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.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
__construct(Container $dic, ilPlugin $plugin)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getFormAction(object $a_gui_obj, string $a_fallback_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)