Public Member Functions | Data Fields

ilTermDefinitionEditorGUI Class Reference

Public Member Functions

 ilTermDefinitionEditorGUI ()
 Constructor public.
executeCommand ()
 editMeta ()
 edit meta data of glossary term definition
 saveMeta ()
 save meta data of glossary term definition
 chooseMetaSection ()
 choose meta section
 addMeta ()
 add a meta subsection/-tag
 deleteMeta ()
 delete meta subsection/-tag
 main_header ($a_header_title)
 output main header (title and locator)
 setTabs ()
 output tabs
 getTabs (&$tabs_gui)
 get tabs
 displayLocator ()
 saveShortText ()

Data Fields

 $ilias
 $tpl
 $lng
 $glossary
 $definition
 $term

Detailed Description

Definition at line 37 of file class.ilTermDefinitionEditorGUI.php.


Member Function Documentation

ilTermDefinitionEditorGUI::addMeta (  ) 

add a meta subsection/-tag

Definition at line 189 of file class.ilTermDefinitionEditorGUI.php.

References $_GET, $_POST, and sendInfo().

        {
                include_once "classes/class.ilMetaDataGUI.php";
                $meta_gui =& new ilMetaDataGUI();
                $meta_gui->setObject($this->definition);
                $meta_name = $_POST["meta_name"] ? $_POST["meta_name"] : $_GET["meta_name"];
                $meta_index = $_POST["meta_index"] ? $_POST["meta_index"] : $_GET["meta_index"];
                if ($meta_index == "")
                        $meta_index = 0;
                $meta_path = $_POST["meta_path"] ? $_POST["meta_path"] : $_GET["meta_path"];
                $meta_section = $_POST["meta_section"] ? $_POST["meta_section"] : $_GET["meta_section"];
                if ($meta_name != "")
                {
                        $meta_gui->meta_obj->add($meta_name, $meta_path, $meta_index);
                }
                else
                {
                        sendInfo($this->lng->txt("meta_choose_element"), true);
                }
                $meta_gui->edit("ADM_CONTENT", "adm_content", $this->ctrl->getLinkTarget($this, "editMeta"),
                        $meta_section);
        }

Here is the call graph for this function:

ilTermDefinitionEditorGUI::chooseMetaSection (  ) 

choose meta section

Definition at line 176 of file class.ilTermDefinitionEditorGUI.php.

References $_REQUEST.

        {
                include_once "classes/class.ilMetaDataGUI.php";
                $meta_gui =& new ilMetaDataGUI();
                $meta_gui->setObject($this->definition);
                $meta_gui->edit("ADM_CONTENT", "adm_content", $this->ctrl->getLinkTarget($this, "editMeta"),
                        $_REQUEST["meta_section"]);
        }

ilTermDefinitionEditorGUI::deleteMeta (  ) 

delete meta subsection/-tag

Definition at line 215 of file class.ilTermDefinitionEditorGUI.php.

References $_GET, and $_POST.

        {
                include_once "classes/class.ilMetaDataGUI.php";
                $meta_gui =& new ilMetaDataGUI();
                $meta_gui->setObject($this->definition);
                $meta_index = $_POST["meta_index"] ? $_POST["meta_index"] : $_GET["meta_index"];
                $meta_gui->meta_obj->delete($_GET["meta_name"], $_GET["meta_path"], $meta_index);
                $meta_gui->edit("ADM_CONTENT", "adm_content", $this->ctrl->getLinkTarget($this, "editMeta"),
                        $_GET["meta_section"]);
        }

ilTermDefinitionEditorGUI::displayLocator (  ) 

Definition at line 326 of file class.ilTermDefinitionEditorGUI.php.

References $_GET.

Referenced by main_header().

        {
                $this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");

                $this->tpl->touchBlock("locator_separator");

                $this->tpl->setCurrentBlock("locator_item");
                $this->tpl->setVariable("ITEM", $this->glossary->getTitle());
                $this->tpl->setVariable("LINK_ITEM", "glossary_edit.php?ref_id=".$_GET["ref_id"]);
                $this->tpl->parseCurrentBlock();

                $this->tpl->touchBlock("locator_separator");

                $this->tpl->setCurrentBlock("locator_item");
                $this->tpl->setVariable("ITEM", $this->term->getTerm());
                $this->tpl->setVariable("LINK_ITEM", "glossary_edit.php?ref_id=".$_GET["ref_id"].
                        "&cmd=listDefinitions&term_id=".$this->term->getId());
                $this->tpl->parseCurrentBlock();

                $this->tpl->setCurrentBlock("locator_item");
                $this->tpl->setVariable("ITEM", $this->lng->txt("cont_definition")." ".$this->definition->getNr());
                $this->tpl->setVariable("LINK_ITEM", "glossary_edit.php?ref_id=".$_GET["ref_id"].
                        "&cmd=".$_GET["cmd"]."&def=".$_GET["def"]);
                $this->tpl->parseCurrentBlock();

                //$this->tpl->touchBlock("locator_separator");

                $this->tpl->setCurrentBlock("locator");
                $this->tpl->setVariable("TXT_LOCATOR", $debug.$this->lng->txt("locator"));
                $this->tpl->parseCurrentBlock();
        }

Here is the caller graph for this function:

ilTermDefinitionEditorGUI::editMeta (  ) 

edit meta data of glossary term definition

Definition at line 151 of file class.ilTermDefinitionEditorGUI.php.

        {
                include_once("classes/class.ilMetaDataGUI.php");
                $meta_gui =& new ilMetaDataGUI();
                $meta_gui->setObject($this->definition);
                $meta_gui->edit("ADM_CONTENT", "adm_content",
                        $this->ctrl->getLinkTarget($this, "saveMeta"));
        }

& ilTermDefinitionEditorGUI::executeCommand (  ) 

Definition at line 67 of file class.ilTermDefinitionEditorGUI.php.

References $_GET, $cmd, ilObjStyleSheet::getContentStylePath(), ilObjStyleSheet::getSyntaxStylePath(), and setTabs().

        {
                $next_class = $this->ctrl->getNextClass($this);
                $cmd = $this->ctrl->getCmd();


                // content style
                $this->tpl->setCurrentBlock("ContentStyle");
                $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
                        ilObjStyleSheet::getContentStylePath(0));
                $this->tpl->parseCurrentBlock();

                // syntax style
                $this->tpl->setCurrentBlock("SyntaxStyle");
                $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
                        ilObjStyleSheet::getSyntaxStylePath());
                $this->tpl->parseCurrentBlock();

                //$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));

                //$this->main_header($this->lng->txt("cont_term").": ".$this->term->getTerm().", ".
                //      $this->lng->txt("cont_definition")." ".$this->definition->getNr());

                require_once ("content/classes/class.ilGlossaryLocatorGUI.php");
                $gloss_loc =& new ilGlossaryLocatorGUI();
                $gloss_loc->setTerm($this->term);
                $gloss_loc->setGlossary($this->glossary);
                $gloss_loc->setDefinition($this->definition);

                $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
                $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
                $this->tpl->setVariable("HEADER", $this->term->getTerm());

                switch ($next_class)
                {

                        case "ilpageobjectgui":
                                if ($this->ctrl->getCmdClass() == "ilpageobjectgui")
                                {
                                        $gloss_loc->display();
                                }
                                $this->setTabs();
                                $this->ctrl->setReturnByClass("ilPageObjectGUI", "view");
                                $this->ctrl->setReturn($this, "listDefinitions");
                                $page =& $this->definition->getPageObject();
                                $page->addUpdateListener($this, "saveShortText");
                                $page_gui =& new ilPageObjectGUI($page);
                                $page_gui->setSourcecodeDownloadScript("glossary_presentation.php?ref_id=".$_GET["ref_id"]);
                                $page_gui->setFullscreenLink("glossary_presentation.php?cmd=fullscreen".
                                        "&ref_id=".$_GET["ref_id"]);
                                $page_gui->setTemplateTargetVar("ADM_CONTENT");
                                $page_gui->setOutputMode("edit");
                                $page_gui->setLocator($gloss_loc);
                                $page_gui->setLinkParams("ref_id=".$_GET["ref_id"]);
                                $page_gui->setHeader($this->term->getTerm());
                                $page_gui->setFileDownloadLink("glossary_presentation.php?cmd=downloadFile".
                                        "&ref_id=".$_GET["ref_id"]);
                                /*
                                $page_gui->setTabs(array(array("cont_all_definitions", "listDefinitions"),
                                                array("edit", "view"),
                                                array("cont_preview", "preview"),
                                                array("meta_data", "editDefinitionMetaData")
                                                ));*/
                                $page_gui->setPresentationTitle($this->term->getTerm());
                                //$page_gui->executeCommand();
                                $ret =& $this->ctrl->forwardCommand($page_gui);

                                break;

                        default:
                                $this->setTabs();
                                $gloss_loc->display();
                                $ret =& $this->$cmd();
                                break;

                }
        }

Here is the call graph for this function:

ilTermDefinitionEditorGUI::getTabs ( &$  tabs_gui  ) 

get tabs

Definition at line 258 of file class.ilTermDefinitionEditorGUI.php.

Referenced by setTabs().

        {
                // edit page
                $tabs_gui->addTarget("edit",
                        $this->ctrl->getLinkTargetByClass("ilPageObjectGUI", "view"), "view",
                        "ilPageObjectGUI");

                // preview page
                $tabs_gui->addTarget("cont_preview",
                        $this->ctrl->getLinkTargetByClass("ilPageObjectGUI", "preview"), "preview",
                        "ilPageObjectGUI");

                // properties
                $tabs_gui->addTarget("meta_data",
                        $this->ctrl->getLinkTarget($this, "editMeta"), "editMeta",
                        get_class($this));

                // back to upper context
                $tabs_gui->addTarget("cont_back",
                        $this->ctrl->getParentReturn($this), "",
                        "");

        }

Here is the caller graph for this function:

ilTermDefinitionEditorGUI::ilTermDefinitionEditorGUI (  ) 

Constructor public.

Definition at line 50 of file class.ilTermDefinitionEditorGUI.php.

References $_GET, $ilCtrl, $ilias, $lng, $objDefinition, and $tpl.

        {
                global $ilias, $tpl, $lng, $objDefinition, $ilCtrl;

                // initiate variables
                $this->ilias =& $ilias;
                $this->tpl =& $tpl;
                $this->lng =& $lng;
                $this->ctrl =& $ilCtrl;
                $this->glossary =& new ilObjGlossary($_GET["ref_id"], true);
                $this->definition =& new ilGlossaryDefinition($_GET["def"]);
                $this->term =& new ilGlossaryTerm($this->definition->getTermId());

                $this->ctrl->saveParameter($this, array("def"));
        }

ilTermDefinitionEditorGUI::main_header ( a_header_title  ) 

output main header (title and locator)

Definition at line 229 of file class.ilTermDefinitionEditorGUI.php.

References $lng, and displayLocator().

        {
                global $lng;

                $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
                $this->tpl->setVariable("HEADER", $a_header_title);
                $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
                $this->displayLocator();
                //$this->setAdminTabs($a_type);
        }

Here is the call graph for this function:

ilTermDefinitionEditorGUI::saveMeta (  ) 

save meta data of glossary term definition

Definition at line 164 of file class.ilTermDefinitionEditorGUI.php.

        {
                include_once("classes/class.ilMetaDataGUI.php");
                $meta_gui =& new ilMetaDataGUI();
                $meta_gui->setObject($this->definition);
                $meta_gui->save();
                $this->ctrl->redirect($this, "editMeta");
        }

ilTermDefinitionEditorGUI::saveShortText (  ) 

Definition at line 358 of file class.ilTermDefinitionEditorGUI.php.

        {
                $this->definition->updateShortText();
        }

ilTermDefinitionEditorGUI::setTabs (  ) 

output tabs

Definition at line 243 of file class.ilTermDefinitionEditorGUI.php.

References getTabs().

Referenced by executeCommand().

        {

                // catch feedback message
                include_once("classes/class.ilTabsGUI.php");
                $tabs_gui =& new ilTabsGUI();
                $this->getTabs($tabs_gui);

                $this->tpl->setVariable("TABS", $tabs_gui->getHTML());

        }

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

ilTermDefinitionEditorGUI::$definition

Definition at line 43 of file class.ilTermDefinitionEditorGUI.php.

ilTermDefinitionEditorGUI::$glossary

Definition at line 42 of file class.ilTermDefinitionEditorGUI.php.

ilTermDefinitionEditorGUI::$ilias

Definition at line 39 of file class.ilTermDefinitionEditorGUI.php.

Referenced by ilTermDefinitionEditorGUI().

ilTermDefinitionEditorGUI::$lng

Definition at line 41 of file class.ilTermDefinitionEditorGUI.php.

Referenced by ilTermDefinitionEditorGUI(), and main_header().

ilTermDefinitionEditorGUI::$term

Definition at line 44 of file class.ilTermDefinitionEditorGUI.php.

ilTermDefinitionEditorGUI::$tpl

Definition at line 40 of file class.ilTermDefinitionEditorGUI.php.

Referenced by ilTermDefinitionEditorGUI().


The documentation for this class was generated from the following file: