ILIAS  release_8 Revision v8.24
class.ilPCCurriculumGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
27{
28 public const CMD_INSERT = 'insert';
29 public const CMD_EDIT = 'edit';
30
31 public function executeCommand(): void
32 {
33 $next_class = $this->ctrl->getNextClass($this);
34 switch ($next_class) {
35 default:
36 $cmd = $this->ctrl->getCmd(self::CMD_EDIT);
37 switch ($cmd) {
38
40 $this->insertNewContentObj();
41 // no break
42 case self::CMD_EDIT:
43 $this->returnToParent();
44 break;
45
46 default:
47 throw new Exception('unknown command: ' . $cmd);
48 }
49 }
50 }
51
52 protected function returnToParent(): void
53 {
54 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
55 }
56
58 {
59 return new ilPCCurriculum(
60 $this->getPage()
61 );
62 }
63
64 public function insertNewContentObj(): void
65 {
66 $this->content_obj = $this->createNewPageContent();
67 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
68 $this->pg_obj->update();
69 }
70}
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, ...)