5 require_once(
"./Services/COPage/classes/class.ilPCContentTemplate.php");
6 require_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
26 public function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id =
"")
30 $this->tpl = $DIC[
"tpl"];
31 $this->ctrl = $DIC->ctrl();
32 $this->lng = $DIC->language();
42 $next_class = $this->ctrl->getNextClass($this);
45 $cmd = $this->ctrl->getCmd();
47 switch ($next_class) {
65 $tpl->setContent($form->getHTML());
77 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
79 $form->setFormAction($ilCtrl->getFormAction($this));
80 $form->setTitle($this->lng->txt(
"cont_ed_insert_templ"));
85 $ts = $this->
getPage()->getContentTemplates();
87 $op =
new ilRadioOption($t[
"title"], $t[
"id"] .
":" . $t[
"parent_type"]);
88 $radg->addOption($op);
91 $form->addItem($radg);
94 $form->addCommandButton(
"create_templ",
$lng->txt(
"insert"));
95 $form->addCommandButton(
"cancelCreate",
$lng->txt(
"cancel"));
108 if ($form->checkInput()) {
110 $this->content_obj->create(
114 $form->getInput(
"page_templ")
116 $this->updated = $this->pg_obj->update();
117 if ($this->updated ===
true) {
118 $this->ctrl->returnToParent($this,
"jump" . $this->hier_id);
123 $form->setValuesByPost();
124 $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
__construct(Container $dic, ilPlugin $plugin)