5require_once(
"./Services/COPage/classes/class.ilPCContentTemplate.php");
6require_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"));
83 $radg->setRequired(
true);
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());
An exception for terminatinating execution or to throw for unit testing.
Class ilPCContentTemplateGUI.
initForm()
Init creation from.
__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id="")
Constructor.
create()
Insert the template.
insert()
Insert content template.
executeCommand()
Execute command.
Content templates are not existing in the page.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
displayValidationError()
display validation errors
This class represents an option in a radio group.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc