27                $this->wiki_gui = $a_wiki_gui;
 
   28                $this->wiki = $this->wiki_gui->object;
 
   32                $this->toolbar = $ilToolbar;
 
   40                $nc = $this->ctrl->getNextClass();
 
   45                                $cmd = $this->ctrl->getCmd(
"listTemplates");
 
   46                                if (in_array(
$cmd, array(
"listTemplates", 
"add", 
"remove", 
"saveTemplateSettings", 
"addPageTemplateFromPageAction", 
"removePageTemplateFromPageAction")))
 
   60                include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
   62                $options = array(
"" => $this->lng->txt(
"please_select"));
 
   63                foreach ($pages as $p)
 
   71                $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
 
   72                $this->toolbar->setOpenFormTag(
true);
 
   73                $this->toolbar->setCloseFormTag(
false);
 
   77                        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
   80                        $this->toolbar->addInputItem(
$si);
 
   81                        $this->toolbar->addFormButton($this->lng->txt(
"wiki_add_template"), 
"add");
 
   82                        $this->toolbar->addSeparator();
 
   87                include_once(
"./Services/Form/classes/class.ilCheckboxInputGUI.php");
 
   88                $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"wiki_empty_page_template"), 
"empty_page_templ");
 
   89                $cb->setChecked($this->wiki->getEmptyPageTemplate());
 
   90                $this->toolbar->addInputItem($cb, 
true);
 
   91                $this->toolbar->addFormButton($this->lng->txt(
"save"), 
"saveTemplateSettings");
 
   94                include_once(
"./Modules/Wiki/classes/class.ilWikiPageTemplatesTableGUI.php");
 
   96                $tab->setOpenFormTag(
false);
 
   97                $tab->setCloseFormTag(
true);
 
   98                $this->tpl->setContent(
$tab->getHTML());
 
  106                include_once(
"./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
 
  108                $wpt->save((
int) 
$_POST[
"templ_page_id"]);
 
  110                $this->ctrl->redirect($this, 
"listTemplates");
 
  118                include_once(
"./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
 
  121                if (is_array(
$_POST[
"id"]))
 
  123                        foreach (
$_POST[
"id"] as $id)
 
  125                                $wpt->remove((
int) $id);
 
  130                $this->ctrl->redirect($this, 
"listTemplates");
 
  138                if (is_array(
$_POST[
"all_ids"]))
 
  140                        include_once(
"./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
 
  141                        foreach (
$_POST[
"all_ids"] as $id)
 
  144                                $wpt->save((
int) $id, (
int) 
$_POST[
"new_pages"][$id], (
int) 
$_POST[
"add_to_page"][$id]);
 
  148                $this->wiki->setEmptyPageTemplate((
int) 
$_POST[
"empty_page_templ"]);
 
  149                $this->wiki->update();
 
  152                $this->ctrl->redirect($this, 
"listTemplates");
 
  162                $page_id = (int)
$_GET[
"wpg_id"];
 
  165                        include_once(
"./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
 
  167                        $wpt->remove($page_id);
 
  171                $this->ctrl->redirect($this, 
"listTemplates");          
 
  176                $page_id = (int)
$_GET[
"wpg_id"];
 
  179                        include_once(
"./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
 
  181                        $wpt->save($page_id);
 
  185                $this->ctrl->redirect($this, 
"listTemplates");          
 
An exception for terminatinating execution or to throw for unit testing.
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Wiki page template gui class.
removePageTemplateFromPageAction()
__construct(ilObjWikiGUI $a_wiki_gui)
Constructor.
saveTemplateSettings()
Save template settings.
addPageTemplateFromPageAction()
executeCommand()
Execute command.
listTemplates()
List templates.
add()
Add page as template page.
TableGUI class for wiki page templates.
static getAllWikiPages($a_wiki_id)
Get all pages of wiki
if(!is_array($argv)) $options