ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilPCListItemGUI.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
24require_once("./Services/COPage/classes/class.ilPCListItem.php");
25require_once("./Services/COPage/classes/class.ilPageContentGUI.php");
26
38{
39
44 public function __construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
45 {
46 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
47 }
48
52 public function executeCommand()
53 {
54 // get next class that processes or forwards current command
55 $next_class = $this->ctrl->getNextClass($this);
56
57 // get current command
58 $cmd = $this->ctrl->getCmd();
59
60 switch ($next_class) {
61 default:
62 $ret = $this->$cmd();
63 break;
64 }
65
66 return $ret;
67 }
68
69
73 public function newItemAfter()
74 {
75 $this->content_obj->newItemAfter();
76 $_SESSION["il_pg_error"] = $this->pg_obj->update();
77 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
78 }
79
83 public function newItemBefore()
84 {
85 $this->content_obj->newItemBefore();
86 $_SESSION["il_pg_error"] = $this->pg_obj->update();
87 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
88 }
89
93 public function deleteItem()
94 {
95 $this->content_obj->deleteItem();
96 $_SESSION["il_pg_error"] = $this->pg_obj->update();
97 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
98 }
99
103 public function moveItemDown()
104 {
105 $this->content_obj->moveItemDown();
106 $_SESSION["il_pg_error"] = $this->pg_obj->update();
107 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
108 }
109
113 public function moveItemUp()
114 {
115 $this->content_obj->moveItemUp();
116 $_SESSION["il_pg_error"] = $this->pg_obj->update();
117 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
118 }
119}
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
Class ilPCListItemGUI.
executeCommand()
execute command
__construct(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
Constructor @access public.
newItemBefore()
insert new list item before current one
deleteItem()
delete a list item
moveItemDown()
move list item down
newItemAfter()
insert new list item after current one
moveItemUp()
move list item up
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
$ret
Definition: parser.php:6