5 require_once(
"./Services/COPage/classes/class.ilPCContentTemplate.php");
6 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
26 function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id =
"")
28 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
37 $next_class = $this->ctrl->getNextClass($this);
40 $cmd = $this->ctrl->getCmd();
61 $tpl->setContent($form->getHTML());
72 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
74 $form->setFormAction($ilCtrl->getFormAction($this));
75 $form->setTitle($this->lng->txt(
"cont_ed_insert_templ"));
80 $ts = $this->
getPage()->getContentTemplates();
83 $op =
new ilRadioOption($t[
"title"], $t[
"id"].
":".$t[
"parent_type"]);
84 $radg->addOption($op);
87 $form->addItem($radg);
90 $form->addCommandButton(
"create_templ", $lng->txt(
"insert"));
91 $form->addCommandButton(
"cancelCreate", $lng->txt(
"cancel"));
104 if ($form->checkInput())
107 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id,
108 $form->getInput(
"page_templ"));
109 $this->updated = $this->pg_obj->update();
110 if ($this->updated ===
true)
112 $this->ctrl->returnToParent($this,
"jump".$this->hier_id);
117 $form->setValuesByPost();
118 $tpl->setContent($form->getHTML());
This class represents an option in a radio group.
insert()
Insert content template.
Content templates are not existing in the page.
__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id="")
Constructor.
create()
Insert the template.
executeCommand()
Execute command.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
initForm()
Init creation from.
Class ilPCContentTemplateGUI.
displayValidationError()
display validation errors