36 $lng = $DIC->language();
42 $this->content_object = $a_content_obj;
55 if (is_array($a_actions)) {
74 if ($this->target_frame[$a_cmd] !=
"") {
75 return $this->target_frame[$a_cmd];
76 } elseif (!empty($a_target_frame)) {
77 return "target=\"" . $a_target_frame .
"\"";
88 $new_type = $_REQUEST[
"new_type"];
90 $this->ctrl->setParameter($this,
"new_type", $new_type);
91 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
93 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
94 $form->setTitle($this->lng->txt($new_type .
"_new"));
101 $form->addItem($desc);
103 $form->addCommandButton(
"save", $this->lng->txt($new_type .
"_add"));
104 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
106 $this->tpl->setContent(
$form->getHTML());
115 $tree =
new ilTree($this->content_object->getId());
117 $tree->setTreeTablePK(
"lm_id");
119 $parent_id = (!empty(
$_GET[
"obj_id"]))
121 : $tree->getRootId();
123 if (!empty(
$_GET[
"target"])) {
127 $childs = $tree->getChildsByType($parent_id, $this->obj->getType());
128 if (count($childs) == 0) {
131 $target = $childs[count($childs) - 1][
"obj_id"];
134 if (!$tree->isInTree($this->obj->getId())) {
135 $tree->insertNode($this->obj->getId(), $parent_id,
$target);
143 public function delete()
149 $this->content_object->getRefId(),
153 $cont_obj_gui->
delete($this->obj->getId());
163 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
174 $this->content_object->getRefId(),
179 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
189 $this->tpl->setCurrentBlock(
"begin_link");
190 $this->tpl->setVariable(
"LINK_TARGET", $link);
191 $this->tpl->parseCurrentBlock();
192 $this->tpl->touchBlock(
"end_link");
195 $this->tpl->setCurrentBlock(
"text");
196 $this->tpl->setVariable(
"TEXT_CONTENT", $val);
197 $this->tpl->parseCurrentBlock();
198 $this->tpl->setCurrentBlock(
"table_cell");
199 $this->tpl->parseCurrentBlock();
214 $notoperations =
array();
215 $operations =
array();
219 if (count($operations) > 0) {
220 foreach ($operations as $val) {
221 $this->tpl->setCurrentBlock(
"operation_btn");
222 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
223 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
224 $this->tpl->parseCurrentBlock();
227 $this->tpl->setCurrentBlock(
"operation");
229 $this->tpl->parseCurrentBlock();
238 $this->content_object->checkTree();
confirmedDelete()
page and structure object deletion
setActions($a_actions="")
build action array
checkTree()
check the content object tree
create()
structure / page object creation form
__construct(&$a_content_obj)
constructor
if(isset($_POST['submit'])) $form
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
This class represents a text property in a property form.
cancelDelete()
cancel deletion of page/structure objects
static clear($a_var)
Unset a value.
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be 'obj_id' You may use...
putInTree()
put this object into content object tree
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Create styles array
The data for the language used.
showActions($a_actions)
show possible action (form buttons)
confirmedDelete($a_parent_subobj_id=0)
delete page object or structure objects
add_cell($val, $link="")
output a cell in object list
This class represents a text area property in a property form.
Class ilObjContentObjectGUI.
delete($a_parent_subobj_id=0)
confirm deletion screen for page object and structure object deletion
getTargetFrame($a_cmd, $a_target_frame="")
get target frame for command (command is method name without "Object", e.g.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d