40 $this->content_object = $a_content_obj;
53 if (is_array($a_actions))
55 foreach ($a_actions as $name => $lng)
57 $this->actions[$name] =
array(
"name" => $name,
"lng" => $lng);
76 if ($this->target_frame[$a_cmd] !=
"")
78 return $this->target_frame[$a_cmd];
80 elseif (!empty($a_target_frame))
82 return "target=\"".$a_target_frame.
"\"";
95 $new_type = $_REQUEST[
"new_type"];
97 $this->ctrl->setParameter($this,
"new_type", $new_type);
98 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
100 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
101 $form->setTitle( $this->lng->txt($new_type.
"_new"));
108 $form->addItem($desc);
110 $form->addCommandButton(
"save", $this->lng->txt($new_type.
"_add"));
111 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
113 $this->tpl->setContent($form->getHTML());
122 $tree =
new ilTree($this->content_object->getId());
124 $tree->setTreeTablePK(
"lm_id");
126 $parent_id = (!empty(
$_GET[
"obj_id"]))
128 : $tree->getRootId();
130 if (!empty(
$_GET[
"target"]))
137 $childs = $tree->getChildsByType($parent_id, $this->obj->getType());
138 if (count($childs) == 0)
144 $target = $childs[count($childs) - 1][
"obj_id"];
147 if (!$tree->isInTree($this->obj->getId()))
149 $tree->insertNode($this->obj->getId(), $parent_id,
$target);
163 $cont_obj_gui->
delete($this->obj->getId());
173 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
185 $this->ctrl->redirect($this,
$_GET[
"backcmd"]);
196 $this->tpl->setCurrentBlock(
"begin_link");
197 $this->tpl->setVariable(
"LINK_TARGET", $link);
198 $this->tpl->parseCurrentBlock();
199 $this->tpl->touchBlock(
"end_link");
202 $this->tpl->setCurrentBlock(
"text");
203 $this->tpl->setVariable(
"TEXT_CONTENT", $val);
204 $this->tpl->parseCurrentBlock();
205 $this->tpl->setCurrentBlock(
"table_cell");
206 $this->tpl->parseCurrentBlock();
217 foreach ($a_actions as $name => $lng)
219 $d[$name] =
array(
"name" => $name,
"lng" => $lng);
222 $notoperations =
array();
223 $operations =
array();
227 if (count($operations) > 0)
229 foreach ($operations as $val)
231 $this->tpl->setCurrentBlock(
"operation_btn");
232 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
233 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
234 $this->tpl->parseCurrentBlock();
237 $this->tpl->setCurrentBlock(
"operation");
239 $this->tpl->parseCurrentBlock();
248 $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
for($col=0; $col< 50; $col++) $d
__construct(&$a_content_obj)
constructor
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
redirection script todo: (a better solution should control the processing via a xml file) ...
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.