ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPageEditorGUI Class Reference

Page Editor GUI class. More...

+ Collaboration diagram for ilPageEditorGUI:

Public Member Functions

 ilPageEditorGUI (&$a_page_object, &$a_page_object_gui)
 Constructor.
 setHeader ($a_header)
 set header title
 getHeader ()
 get header title
 setLocator (&$a_locator)
 set locator object
 returnToContext ()
 redirect to parent context
 setIntLinkHelpDefault ($a_type, $a_id)
 setIntLinkReturn ($a_return)
 setPageBackTitle ($a_title)
 setEnableInternalLinks ($a_val)
 Set enable internal links.
 getEnableInternalLinks ()
 Get enable internal links.
 setEnableKeywords ($a_val)
 Set enable keywords handling.
 getEnableKeywords ()
 Get enable keywords handling.
 setEnableAnchors ($a_val)
 Set enable anchors.
 getEnableAnchors ()
 Get enable anchors.
executeCommand ()
 execute command
 _doJSEditing ()
 checks if current user has activated js editing and if browser is js capable
 _isBrowserJSEditCapable ()
 checks wether browser is javascript editing capable
 activatePage ()
 deactivatePage ()
 setMediaMode ()
 set media and editing mode
 copyLinkedMediaToClipboard ()
 copy linked media object to clipboard
 copyLinkedMediaToMediaPool ()
 copy linked media object to media pool
 addChangeComment ()
 add change comment to history
 deleteSelected ()
 Delete selected items.
 copySelected ()
 Copy selected items.
 cutSelected ()
 Cut selected items.
 paste ($a_hier_id)
 paste from clipboard (redirects to clipboard)
 activateSelected ()
 (de-)activate selected items
 assignCharacteristicForm ()
 Assign characeristic to text blocks/sections.
 initCharacteristicForm ($a_target, $a_types)
 Init map creation/update form.
 assignCharacteristic ()
 Assign characteristic.
 pasteFromClipboard ($a_hier_id)
 paste from clipboard (redirects to clipboard)
 insertFromClipboard ()
 insert object from clipboard
 displayPage ()
 Default for POST reloads and missing.
 displayLocator ()
 display locator
 showSnippetInfo ()
 Show snippet info.

Data Fields

 $ilias
 $tpl
 $lng
 $ctrl
 $objDefinition
 $page
 $target_script
 $return_location
 $header
 $tabs
 $cont_obj
 $enable_keywords
 $enable_anchors

Detailed Description

Member Function Documentation

ilPageEditorGUI::_doJSEditing ( )

checks if current user has activated js editing and if browser is js capable

Definition at line 792 of file class.ilPageEditorGUI.php.

References $ilias, $ilSetting, and _isBrowserJSEditCapable().

Referenced by ilPCDataTableGUI\editData(), ilPCPlaceHolderGUI\insertPCText(), and ilPageObjectGUI\showPage().

{
global $ilUser, $ilias, $ilSetting;
if ($ilUser->getPref("ilPageEditor_JavaScript") != "disable"
{
return true;
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageEditorGUI::_isBrowserJSEditCapable ( )

checks wether browser is javascript editing capable

Definition at line 807 of file class.ilPageEditorGUI.php.

Referenced by _doJSEditing().

{
global $ilBrowser;
return true;
$version = $ilBrowser->getVersion();
if ($ilBrowser->isFirefox() ||
($ilBrowser->isIE() && !$ilBrowser->isMac()) ||
($ilBrowser->isMozilla() && $version[0] >= 5))
{
return true;
}
return false;
}

+ Here is the caller graph for this function:

ilPageEditorGUI::activatePage ( )

Definition at line 822 of file class.ilPageEditorGUI.php.

{
$this->page_gui->activatePage();
}
ilPageEditorGUI::activateSelected ( )

(de-)activate selected items

Definition at line 986 of file class.ilPageEditorGUI.php.

References $_POST, and $_SESSION.

{
if (is_int(strpos($_POST["target"][0], ";")))
{
$_POST["target"] = explode(";", $_POST["target"][0]);
}
if (is_array($_POST["target"]))
{
$updated = $this->page->switchEnableMultiple($_POST["target"], true,
$this->page_gui->getEnabledSelfAssessment());
if($updated !== true)
{
$_SESSION["il_pg_error"] = $updated;
}
else
{
unset($_SESSION["il_pg_error"]);
}
}
$this->ctrl->returnToParent($this);
}
ilPageEditorGUI::addChangeComment ( )

add change comment to history

Definition at line 890 of file class.ilPageEditorGUI.php.

References $_POST, ilHistory\_createEntry(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
include_once("classes/class.ilHistory.php");
ilHistory::_createEntry($this->page->getId(), "update",
"", $this->page->getParentType().":pg",
ilUtil::stripSlashes($_POST["change_comment"]), true);
ilUtil::sendSuccess($this->lng->txt("cont_added_comment"), true);
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilPageEditorGUI::assignCharacteristic ( )

Assign characteristic.

Definition at line 1103 of file class.ilPageEditorGUI.php.

References $_POST, $_SESSION, $cont_obj, $t, and ilUtil\stripSlashes().

{
$char_par = ilUtil::stripSlashes($_POST["char_par"]);
$char_sec = ilUtil::stripSlashes($_POST["char_sec"]);
if (is_array($_POST["target"]))
{
foreach ($_POST["target"] as $t)
{
$tarr = explode(":", $t);
$cont_obj =& $this->page->getContentObject($tarr[0], $tarr[1]);
if (is_object($cont_obj) && $cont_obj->getType() == "par")
{
$cont_obj->setCharacteristic($char_par);
}
if (is_object($cont_obj) && $cont_obj->getType() == "sec")
{
$cont_obj->setCharacteristic($char_sec);
}
}
$updated = $this->page->update();
if($updated !== true)
{
$_SESSION["il_pg_error"] = $updated;
}
else
{
unset($_SESSION["il_pg_error"]);
}
}
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilPageEditorGUI::assignCharacteristicForm ( )

Assign characeristic to text blocks/sections.

Definition at line 1011 of file class.ilPageEditorGUI.php.

References $_POST, $cont_obj, $lng, $t, $tpl, initCharacteristicForm(), and ilUtil\sendFailure().

{
global $tpl, $lng;
if (is_int(strpos($_POST["target"][0], ";")))
{
$_POST["target"] = explode(";", $_POST["target"][0]);
}
if (is_array($_POST["target"]))
{
$types = array();
// check what content element types have been selected
foreach ($_POST["target"] as $t)
{
$tarr = explode(":", $t);
$cont_obj =& $this->page->getContentObject($tarr[0], $tarr[1]);
if (is_object($cont_obj) && $cont_obj->getType() == "par")
{
$types["par"] = "par";
}
if (is_object($cont_obj) && $cont_obj->getType() == "sec")
{
$types["sec"] = "sec";
}
}
if (count($types) == 0)
{
ilUtil::sendFailure($lng->txt("cont_select_par_or_section"), true);
$this->ctrl->returnToParent($this);
}
else
{
$this->initCharacteristicForm($_POST["target"], $types);
$tpl->setContent($this->form->getHTML());
}
}
else
{
$this->ctrl->returnToParent($this);
}
}

+ Here is the call graph for this function:

ilPageEditorGUI::copyLinkedMediaToClipboard ( )

copy linked media object to clipboard

Definition at line 867 of file class.ilPageEditorGUI.php.

References $_POST, ilObject\_lookupTitle(), and ilUtil\sendSuccess().

{
global $ilUser;
ilUtil::sendSuccess($this->lng->txt("copied_to_clipboard"), true);
$ilUser->addObjectToClipboard($_POST["mob_id"], "mob", ilObject::_lookupTitle($_POST["mob_id"]));
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilPageEditorGUI::copyLinkedMediaToMediaPool ( )

copy linked media object to media pool

Definition at line 879 of file class.ilPageEditorGUI.php.

References $_POST.

{
global $ilUser;
$this->ctrl->setParameterByClass("ilmediapooltargetselector", "mob_id", $_POST["mob_id"]);
$this->ctrl->redirectByClass("ilmediapooltargetselector", "listPools");
}
ilPageEditorGUI::copySelected ( )

Copy selected items.

Definition at line 928 of file class.ilPageEditorGUI.php.

References $_POST, $lng, and ilUtil\sendSuccess().

{
global $lng;
if (is_int(strpos($_POST["target"][0], ";")))
{
$_POST["target"] = explode(";", $_POST["target"][0]);
}
if (is_array($_POST["target"]))
{
$this->page->copyContents($_POST["target"]);
ilUtil::sendSuccess($lng->txt("cont_sel_el_copied_use_paste"), true);
}
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilPageEditorGUI::cutSelected ( )

Cut selected items.

Definition at line 947 of file class.ilPageEditorGUI.php.

References $_POST, $_SESSION, $lng, and ilUtil\sendSuccess().

{
global $lng;
if (is_int(strpos($_POST["target"][0], ";")))
{
$_POST["target"] = explode(";", $_POST["target"][0]);
}
if (is_array($_POST["target"]))
{
$updated = $this->page->cutContents($_POST["target"]);
if($updated !== true)
{
$_SESSION["il_pg_error"] = $updated;
}
else
{
unset($_SESSION["il_pg_error"]);
}
ilUtil::sendSuccess($lng->txt("cont_sel_el_cut_use_paste"), true);
}
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilPageEditorGUI::deactivatePage ( )

Definition at line 827 of file class.ilPageEditorGUI.php.

{
$this->page_gui->deactivatePage();
}
ilPageEditorGUI::deleteSelected ( )

Delete selected items.

Definition at line 903 of file class.ilPageEditorGUI.php.

References $_POST, and $_SESSION.

{
if (is_int(strpos($_POST["target"][0], ";")))
{
$_POST["target"] = explode(";", $_POST["target"][0]);
}
if (is_array($_POST["target"]))
{
$updated = $this->page->deleteContents($_POST["target"], true,
$this->page_gui->getEnabledSelfAssessment());
if($updated !== true)
{
$_SESSION["il_pg_error"] = $updated;
}
else
{
unset($_SESSION["il_pg_error"]);
}
}
$this->ctrl->returnToParent($this);
}
ilPageEditorGUI::displayLocator ( )

display locator

Definition at line 1197 of file class.ilPageEditorGUI.php.

Referenced by executeCommand().

{
if(is_object($this->locator))
{
$this->locator->display();
}
}

+ Here is the caller graph for this function:

ilPageEditorGUI::displayPage ( )

Default for POST reloads and missing.

Definition at line 1189 of file class.ilPageEditorGUI.php.

{
$this->ctrl->returnToParent($this);
}
& ilPageEditorGUI::executeCommand ( )

execute command

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

References $_GET, $_POST, $cmd, $cont_obj, $ilCtrl, $ret, ilObject\_lookupTitle(), displayLocator(), getEnableAnchors(), getEnableInternalLinks(), getEnableKeywords(), getHeader(), paste(), and pasteFromClipboard().

{
global $ilCtrl;
$cmd = $this->ctrl->getCmd("displayPage");
$cmdClass = strtolower($this->ctrl->getCmdClass());
$hier_id = $_GET["hier_id"];
$pc_id = $_GET["pc_id"];
if(isset($_POST["new_hier_id"]))
{
$hier_id = $_POST["new_hier_id"];
}
//echo "GEThier_id:".$_GET["hier_id"]."<br>";
//$this->ctrl->debug("hier_id:".$hier_id);
$new_type = (isset($_GET["new_type"]))
? $_GET["new_type"]
: $_POST["new_type"];
//echo "-$cmd-";
//var_dump($_GET); var_dump($_POST); exit;
/*array
'target' =>
array
0 => string '' (length=0)
'commandpg' => string 'insertJS' (length=8)
'cmd' =>
array
'exec_pg:' => string 'Ok' (length=2)
'ajaxform_content' => string '<div class=\"ilc_text_block_Standard\">sdfsdfsd sd</div>' (length=56)
'ajaxform_char' => string '' (length=0)*/
/*array
'usedwsiwygeditor' => string '0' (length=1)
'par_characteristic' => string 'Standard' (length=8)
'par_content' => string 'adasdaasda a
' (length=14)
'par_language' => string 'en' (length=2)
'cmd' =>
array
'create_par' => string 'Save' (length=4)*/
if (substr($cmd, 0, 5) == "exec_")
{
//echo ":".key($_POST["cmd"]).":";
// check whether pc id is given
$pca = explode(":", key($_POST["cmd"]));
$pc_id = $pca[1];
//echo "<br />exec_pc_id:-$pc_id-";
$cmd = explode("_", $pca[0]);
unset($cmd[0]);
$hier_id = implode($cmd, "_");
$cmd = $_POST["command".$hier_id];
}
//echo "<br>cmd:$cmd:";exit;
// strip "c" "r" of table ids from hierarchical id
$first_hier_character = substr($hier_id, 0, 1);
if ($first_hier_character == "c" ||
$first_hier_character == "r" ||
$first_hier_character == "i")
{
$hier_id = substr($hier_id, 1);
}
$this->page->buildDom();
$this->page->addHierIDs();
// determine command and content object
if ($cmdClass != "ilfilesystemgui")
{
$com = explode("_", $cmd);
$cmd = $com[0];
}
$next_class = $this->ctrl->getNextClass($this);
// determine content type
if ($com[0] == "insert" || $com[0] == "create")
{
$cmd = $com[0];
$ctype = $com[1];
$add_type = $com[2];
if ($ctype == "mob") $ctype = "media";
}
else
{
// setting cmd and cmdclass for editing of linked media
if ($cmd == "editLinkedMedia")
{
$this->ctrl->setCmd("edit");
$cmd = "edit";
$_GET["pgEdMediaMode"] = "editLinkedMedia";
$_GET["mob_id"] = $_POST["mob_id"];
}
if ($_GET["pgEdMediaMode"] == "editLinkedMedia")
{
$this->ctrl->setParameter($this, "pgEdMediaMode", "editLinkedMedia");
$this->ctrl->setParameter($this, "mob_id", $_GET["mob_id"]);
if ($cmdClass != "ilinternallinkgui" && $cmdClass != "ilmdeditorgui"
&& $cmdClass != "ilimagemapeditorgui" && $cmdClass != "ilfilesystemgui")
{
$this->ctrl->setCmdClass("ilobjmediaobjectgui");
$cmdClass = "ilobjmediaobjectgui";
}
}
if (false)
{
var_dump($_POST);
var_dump($_GET);
echo ";$cmd;".$next_class.";";
echo "-$pc_id-";
echo "-$cmd-".$this->ctrl->getCmd()."-";
}
//var_dump($_POST);
// note: ilinternallinkgui for page: no cont_obj is received
// ilinternallinkgui for mob: cont_obj is received
if ($cmd != "insertFromClipboard" && $cmd != "pasteFromClipboard" &&
$cmd != "setMediaMode" && $cmd != "copyLinkedMediaToClipboard" &&
$cmd != "activatePage" && $cmd != "deactivatePage" &&
$cmd != "copyLinkedMediaToMediaPool" && $cmd != "showSnippetInfo" &&
$cmd != "deleteSelected" && $cmd != "paste" &&
$cmd != "copySelected" && $cmd != "cutSelected" &&
($cmd != "displayPage" || $_POST["editImagemapForward_x"] != "" || $_POST["imagemap_x"] != "") &&
($cmd != "displayPage" || $_POST["editImagemapForward_x"] != "") &&
$cmd != "activateSelected" && $cmd != "assignCharacteristicForm" &&
$cmd != "assignCharacteristic" &&
$cmd != "cancelCreate" && $cmd != "popup" &&
$cmdClass != "ileditclipboardgui" && $cmd != "addChangeComment" &&
($cmdClass != "ilinternallinkgui" || ($next_class == "ilpcmediaobjectgui")))
{
if ($_GET["pgEdMediaMode"] != "editLinkedMedia")
{
//$this->ctrl->debug("gettingContentObject (no linked media)");
//echo $hier_id."-".$pc_id;
$cont_obj =& $this->page->getContentObject($hier_id, $pc_id);
if (!is_object($cont_obj))
{
$ilCtrl->returnToParent($this);
}
$ctype = $cont_obj->getType();
}
}
}
//$this->ctrl->debug("+ctype:".$ctype."+");
// $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
// $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
if ($ctype != "media" || !is_object ($cont_obj))
{
if ($this->getHeader() != "")
{
$this->tpl->setTitle($this->getHeader());
}
$this->displayLocator();
}
$this->cont_obj =& $cont_obj;
// special command / command class handling
$this->ctrl->setParameter($this, "hier_id", $hier_id);
$this->ctrl->setParameter($this, "pc_id", $pc_id);
$this->ctrl->setCmd($cmd);
//$next_class = $this->ctrl->getNextClass($this);
//$this->ctrl->debug("+next_class:".$next_class."+");
//echo("+next_class:".$next_class."+".$ctype."+"); exit;
if ($next_class == "")
{
switch($ctype)
{
case "src":
$this->ctrl->setCmdClass("ilPCSourcecodeGUI");
break;
case "par":
$this->ctrl->setCmdClass("ilPCParagraphGUI");
break;
// advanced table
case "tab":
$this->ctrl->setCmdClass("ilPCTableGUI");
break;
// data table
case "dtab":
$this->ctrl->setCmdClass("ilPCDataTableGUI");
break;
case "td":
$this->ctrl->setCmdClass("ilPCTableDataGUI");
break;
case "media":
$this->ctrl->setCmdClass("ilPCMediaObjectGUI");
break;
case "list":
$this->ctrl->setCmdClass("ilPCListGUI");
break;
case "li":
$this->ctrl->setCmdClass("ilPCListItemGUI");
break;
case "flst":
$this->ctrl->setCmdClass("ilPCFileListGUI");
break;
case "flit":
$this->ctrl->setCmdClass("ilPCFileItemGUI");
break;
case "pcqst":
$this->ctrl->setCmdClass("ilPCQuestionGUI");
break;
case "sec":
$this->ctrl->setCmdClass("ilPCSectionGUI");
break;
case "repobj":
$this->ctrl->setCmdClass("ilPCResourcesGUI");
break;
case 'lpe':
$this->ctrl->setCmdClass('ilPCLoginPageElementGUI');
break;
case "map":
$this->ctrl->setCmdClass("ilPCMapGUI");
break;
case "tabs":
$this->ctrl->setCmdClass("ilPCTabsGUI");
break;
case "tabstab":
$this->ctrl->setCmdClass("ilPCTabGUI");
break;
case "plug":
$this->ctrl->setCmdClass("ilPCPluggedGUI");
break;
case "plach":
$this->ctrl->setCmdClass("ilPCPlaceHolderGUI");
break;
case "incl":
$this->ctrl->setCmdClass("ilPCContentIncludeGUI");
break;
case "iim":
$this->ctrl->setCmdClass("ilPCInteractiveImageGUI");
break;
case "prof":
$this->ctrl->setCmdClass("ilPCProfileGUI");
break;
case "vrfc":
$this->ctrl->setCmdClass("ilPCVerificationGUI");
break;
case "blog":
$this->ctrl->setCmdClass("ilPCBlogGUI");
break;
case "qover":
$this->ctrl->setCmdClass("ilPCQuestionOverviewGUI");
break;
case "skills":
$this->ctrl->setCmdClass("ilPCSkillsGUI");
break;
}
$next_class = $this->ctrl->getNextClass($this);
}
// do not do this while imagemap editing is ongoing
if ($cmd == "displayPage" && $_POST["editImagemapForward_x"] == "" && $_POST["imagemap_x"] == "")
{
$next_class = "";
}
//echo "hier_id:$hier_id:type:$type:cmd:$cmd:ctype:$ctype:next_class:$next_class:<br>"; exit;
switch($next_class)
{
case "ilinternallinkgui":
$link_gui = new ilInternalLinkGUI(
$this->int_link_def_type, $this->int_link_def_id);
$link_gui->setMode("normal");
$link_gui->setFilterWhiteList(
$this->page_gui->getPageConfig()->getIntLinkFilterWhiteList());
foreach ($this->page_gui->getPageConfig()->getIntLinkFilters() as $filter)
{
$link_gui->filterLinkType($filter);
}
// $link_gui->setSetLinkTargetScript(
// $this->ctrl->getLinkTarget($this, "setInternalLink"));
$link_gui->setReturn($this->int_link_return);
if ($ilCtrl->isAsynch())
{
$link_gui->setMode("asynch");
}
$ret =& $this->ctrl->forwardCommand($link_gui);
break;
// Sourcecode
case "ilpcsourcecodegui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCSourcecodeGUI.php");
$src_gui =& new ilPCSourcecodeGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret =& $this->ctrl->forwardCommand($src_gui);
break;
// Paragraph
case "ilpcparagraphgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCParagraphGUI.php");
$par_gui =& new ilPCParagraphGUI($this->page, $cont_obj, $hier_id, $pc_id);
$par_gui->setEnableWikiLinks($this->page_gui->getEnabledWikiLinks());
$par_gui->setStyleId($this->page_gui->getStyleId());
$par_gui->setEnableInternalLinks($this->getEnableInternalLinks());
$par_gui->setEnableKeywords($this->getEnableKeywords());
$par_gui->setEnableAnchors($this->getEnableAnchors());
$ret =& $this->ctrl->forwardCommand($par_gui);
break;
// Table
case "ilpctablegui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCTableGUI.php");
$tab_gui =& new ilPCTableGUI($this->page, $cont_obj, $hier_id, $pc_id);
$tab_gui->setStyleId($this->page_gui->getStyleId());
$ret =& $this->ctrl->forwardCommand($tab_gui);
break;
// Table Cell
case "ilpctabledatagui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCTableDataGUI.php");
$td_gui =& new ilPCTableDataGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret =& $this->ctrl->forwardCommand($td_gui);
break;
// Data Table
case "ilpcdatatablegui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCDataTableGUI.php");
$tab_gui =& new ilPCDataTableGUI($this->page, $cont_obj, $hier_id, $pc_id);
$tab_gui->setStyleId($this->page_gui->getStyleId());
$tab_gui->setEnableInternalLinks($this->getEnableInternalLinks());
$tab_gui->setEnableKeywords($this->getEnableKeywords());
$tab_gui->setEnableAnchors($this->getEnableAnchors());
$ret =& $this->ctrl->forwardCommand($tab_gui);
break;
// PC Media Object
case "ilpcmediaobjectgui":
include_once ("./Services/COPage/classes/class.ilPCMediaObjectGUI.php");
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->page_gui->page_back_title,
$ilCtrl->getLinkTarget($this->page_gui, "edit"));
$pcmob_gui =& new ilPCMediaObjectGUI($this->page, $cont_obj, $hier_id, $pc_id);
$pcmob_gui->setStyleId($this->page_gui->getStyleId());
$pcmob_gui->setEnabledMapAreas($this->page_gui->getEnabledInternalLinks());
$ret =& $this->ctrl->forwardCommand($pcmob_gui);
break;
// only for "linked" media
case "ilobjmediaobjectgui":
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$ilCtrl->getParentReturn($this));
$mob_gui =& new ilObjMediaObjectGUI("", $_GET["mob_id"],false, false);
$mob_gui->getTabs($this->tabs_gui);
$mob_gui->setEnabledMapAreas($this->page_gui->getEnabledInternalLinks());
$this->tpl->setTitle($this->lng->txt("mob").": ".
$ret =& $this->ctrl->forwardCommand($mob_gui);
break;
// List
case "ilpclistgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCListGUI.php");
$list_gui =& new ilPCListGUI($this->page, $cont_obj, $hier_id, $pc_id);
$list_gui->setStyleId($this->page_gui->getStyleId());
$ret =& $this->ctrl->forwardCommand($list_gui);
break;
// List Item
case "ilpclistitemgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCListItemGUI.php");
$list_item_gui =& new ilPCListItemGUI($this->page, $cont_obj, $hier_id, $pc_id);
//$ret =& $list_item_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($list_item_gui);
break;
// File List
case "ilpcfilelistgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCFileListGUI.php");
$file_list_gui =& new ilPCFileListGUI($this->page, $cont_obj, $hier_id, $pc_id);
// scorm2004-start
$file_list_gui->setStyleId($this->page_gui->getStyleId());
// scorm2004-end
//$ret =& $file_list_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($file_list_gui);
break;
// File List Item
case "ilpcfileitemgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCFileItemGUI.php");
$file_item_gui =& new ilPCFileItemGUI($this->page, $cont_obj, $hier_id, $pc_id);
//$ret =& $file_item_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($file_item_gui);
break;
// Question
case "ilpcquestiongui":
include_once("./Services/COPage/classes/class.ilPCQuestionGUI.php");
$pc_question_gui =& new ilPCQuestionGUI($this->page, $cont_obj, $hier_id, $pc_id);
$pc_question_gui->setSelfAssessmentMode($this->page_gui->getEnabledSelfAssessment());
$pc_question_gui->setPageConfig($this->page_gui->getPageConfig());
if ($this->page_gui->getEnabledSelfAssessment())
{
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$ilCtrl->getParentReturn($this));
$ret = $this->ctrl->forwardCommand($pc_question_gui);
}
else
{
$cmd = $this->ctrl->getCmd();
$pc_question_gui->$cmd();
$this->ctrl->redirectByClass(array("ilobjquestionpoolgui", get_class($cont_obj)), "editQuestion");
}
break;
// PlaceHolder
case "ilpcplaceholdergui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCPlaceHolderGUI.php");
$plch_gui =& new ilPCPlaceHolderGUI($this->page, $cont_obj, $hier_id, $pc_id);
$plch_gui->setEnableInternalLinks($this->getEnableInternalLinks());
$plch_gui->setEnableKeywords($this->getEnableKeywords());
$plch_gui->setEnableAnchors($this->getEnableAnchors());
$plch_gui->setStyleId($this->page_gui->getStyleId());
$ret =& $this->ctrl->forwardCommand($plch_gui);
break;
// Section
case "ilpcsectiongui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCSectionGUI.php");
$sec_gui =& new ilPCSectionGUI($this->page, $cont_obj, $hier_id, $pc_id);
$sec_gui->setStyleId($this->page_gui->getStyleId());
$ret =& $this->ctrl->forwardCommand($sec_gui);
break;
// Resources
case "ilpcresourcesgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCResourcesGUI.php");
$res_gui =& new ilPCResourcesGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret =& $this->ctrl->forwardCommand($res_gui);
break;
// Login Page elements
case 'ilpcloginpageelementgui':
$this->tabs_gui->clearTargets();
include_once './Services/COPage/classes/class.ilPCLoginPageElementGUI.php';
$res_gui = new ilPCLoginPageElementGUI($this->page,$cont_obj,$hier_id,$pc_id);
$ret = $this->ctrl->forwardCommand($res_gui);
break;
// Map
case "ilpcmapgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCMapGUI.php");
$map_gui =& new ilPCMapGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret =& $this->ctrl->forwardCommand($map_gui);
break;
// Tabs
case "ilpctabsgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCTabsGUI.php");
$tabs_gui =& new ilPCTabsGUI($this->page, $cont_obj, $hier_id, $pc_id);
$tabs_gui->setStyleId($this->page_gui->getStyleId());
$ret =& $this->ctrl->forwardCommand($tabs_gui);
break;
// Tab
case "ilpctabgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCTabGUI.php");
$tab_gui = new ilPCTabGUI($this->page, $cont_obj, $hier_id, $pc_id);
//$ret =& $list_item_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($tab_gui);
break;
// Plugged Component
case "ilpcpluggedgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCPluggedGUI.php");
$plugged_gui =& new ilPCPluggedGUI($this->page, $cont_obj, $hier_id,
$add_type, $pc_id);
$ret =& $this->ctrl->forwardCommand($plugged_gui);
break;
// Content Include
case "ilpccontentincludegui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCContentIncludeGUI.php");
$incl_gui = new ilPCContentIncludeGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret =& $this->ctrl->forwardCommand($incl_gui);
break;
// Interactive Image
case "ilpcinteractiveimagegui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCInteractiveImageGUI.php");
$iim_gui = new ilPCInteractiveImageGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret = $this->ctrl->forwardCommand($iim_gui);
break;
// Profile
case "ilpcprofilegui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCProfileGUI.php");
$prof_gui = new ilPCProfileGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret = $this->ctrl->forwardCommand($prof_gui);
break;
// Verification
case "ilpcverificationgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCVerificationGUI.php");
$vrfc_gui = new ilPCVerificationGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret = $this->ctrl->forwardCommand($vrfc_gui);
break;
// Blog
case "ilpcbloggui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCBlogGUI.php");
$blog_gui = new ilPCBlogGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret = $this->ctrl->forwardCommand($blog_gui);
break;
// Question Overview
case "ilpcquestionoverviewgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCQuestionOverviewGUI.php");
$qover_gui =& new ilPCQuestionOverviewGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret = $this->ctrl->forwardCommand($qover_gui);
break;
// Skills
case "ilpcskillsgui":
$this->tabs_gui->clearTargets();
include_once ("./Services/COPage/classes/class.ilPCSkillsGUI.php");
$skills_gui = new ilPCSkillsGUI($this->page, $cont_obj, $hier_id, $pc_id);
$ret = $this->ctrl->forwardCommand($skills_gui);
break;
default:
if ($cmd == "pasteFromClipboard")
{
$ret = $this->pasteFromClipboard($hier_id);
}
else if ($cmd == "paste")
{
$ret = $this->paste($hier_id);
}
else
{
$ret = $this->$cmd();
}
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilPageEditorGUI::getEnableAnchors ( )

Get enable anchors.

Returns
boolean anchors

Definition at line 181 of file class.ilPageEditorGUI.php.

References $enable_anchors.

Referenced by executeCommand().

{
}

+ Here is the caller graph for this function:

ilPageEditorGUI::getEnableInternalLinks ( )

Get enable internal links.

Returns
boolean enable internal links

Definition at line 141 of file class.ilPageEditorGUI.php.

Referenced by executeCommand().

{
return $this->enable_internal_links;
}

+ Here is the caller graph for this function:

ilPageEditorGUI::getEnableKeywords ( )

Get enable keywords handling.

Returns
boolean keywords handling

Definition at line 161 of file class.ilPageEditorGUI.php.

References $enable_keywords.

Referenced by executeCommand().

+ Here is the caller graph for this function:

ilPageEditorGUI::getHeader ( )

get header title

Returns
string header title

Definition at line 86 of file class.ilPageEditorGUI.php.

References $header.

Referenced by executeCommand().

{
return $this->header;
}

+ Here is the caller graph for this function:

ilPageEditorGUI::ilPageEditorGUI ( $a_page_object,
$a_page_object_gui 
)

Constructor.

Parameters
object$a_page_objectpage object public

Definition at line 53 of file class.ilPageEditorGUI.php.

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

{
global $ilias, $tpl, $lng, $objDefinition, $ilCtrl,$ilTabs;
// initiate variables
$this->ilias =& $ilias;
$this->ctrl =& $ilCtrl;
$this->tpl =& $tpl;
$this->lng =& $lng;
$this->objDefinition = $objDefinition;
$this->tabs_gui =& $ilTabs;
$this->page =& $a_page_object;
$this->page_gui =& $a_page_object_gui;
$this->ctrl->saveParameter($this, array("hier_id", "pc_id"));
}
ilPageEditorGUI::initCharacteristicForm (   $a_target,
  $a_types 
)

Init map creation/update form.

Definition at line 1058 of file class.ilPageEditorGUI.php.

References $ilCtrl, $lng, $t, ilPCSectionGUI\_getCharacteristics(), and ilPCParagraphGUI\_getCharacteristics().

Referenced by assignCharacteristicForm().

{
global $ilCtrl, $lng;
// edit form
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->setTitle($this->lng->txt("cont_choose_characteristic"));
if ($a_types["par"] == "par")
{
$select_prop = new ilSelectInputGUI($this->lng->txt("cont_choose_characteristic_text"),
"char_par");
include_once("./Services/COPage/classes/class.ilPCParagraphGUI.php");
$options = ilPCParagraphGUI::_getCharacteristics($this->page_gui->getStyleId());
$select_prop->setOptions($options);
$this->form->addItem($select_prop);
}
if ($a_types["sec"] == "sec")
{
$select_prop = new ilSelectInputGUI($this->lng->txt("cont_choose_characteristic_section"),
"char_sec");
include_once("./Services/COPage/classes/class.ilPCSectionGUI.php");
$options = ilPCSectionGUI::_getCharacteristics($this->page_gui->getStyleId());
$select_prop->setOptions($options);
$this->form->addItem($select_prop);
}
foreach ($a_target as $t)
{
$hidden = new ilHiddenInputGUI("target[]");
$hidden->setValue($t);
$this->form->addItem($hidden);
}
$this->form->setFormAction($ilCtrl->getFormAction($this));
$this->form->addCommandButton("assignCharacteristic", $lng->txt("save"));
$this->form->addCommandButton("showPage", $lng->txt("cancel"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageEditorGUI::insertFromClipboard ( )

insert object from clipboard

Definition at line 1153 of file class.ilPageEditorGUI.php.

References $_GET, ilEditClipboardGUI\_getSelectedIDs(), ilPCContentInclude\create(), and ilPCMediaObject\readMediaObject().

{
include_once("./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
include_once ("./Services/COPage/classes/class.ilPCMediaObject.php");
if ($ids != "")
{
foreach ($ids as $id2)
{
$id = explode(":", $id2);
$type = $id[0];
$id = $id[1];
if ($type == "mob")
{
$this->content_obj = new ilPCMediaObject($this->page->getDom());
$this->content_obj->readMediaObject($id);
$this->content_obj->createAlias($this->page, $_GET["hier_id"]);
$this->updated = $this->page->update();
}
if ($type == "incl")
{
include_once("./Services/COPage/classes/class.ilPCContentInclude.php");
$this->content_obj = new ilPCContentInclude($this->page->getDom());
$this->content_obj->create($this->page, $_GET["hier_id"]);
$this->content_obj->setContentType("mep");
$this->content_obj->setContentId($id);
$this->updated = $this->page->update();
}
}
}
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilPageEditorGUI::paste (   $a_hier_id)

paste from clipboard (redirects to clipboard)

Definition at line 974 of file class.ilPageEditorGUI.php.

References $ilCtrl, and ilEditClipboard\setAction().

Referenced by executeCommand().

{
global $ilCtrl;
$this->page->pasteContents($a_hier_id, $this->page_gui->getEnabledSelfAssessment());
include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageEditorGUI::pasteFromClipboard (   $a_hier_id)

paste from clipboard (redirects to clipboard)

Definition at line 1138 of file class.ilPageEditorGUI.php.

References $ilCtrl.

Referenced by executeCommand().

{
global $ilCtrl;
//var_dump($a_hier_id);
$ilCtrl->setParameter($this, "hier_id", $a_hier_id);
$ilCtrl->setParameterByClass("ilEditClipboardGUI", "returnCommand",
rawurlencode($ilCtrl->getLinkTarget($this,
"insertFromClipboard", "", false, false)));
//echo ":".$ilCtrl->getLinkTarget($this, "insertFromClipboard").":";
$ilCtrl->redirectByClass("ilEditClipboardGUI", "getObject");
}

+ Here is the caller graph for this function:

ilPageEditorGUI::returnToContext ( )

redirect to parent context

Definition at line 104 of file class.ilPageEditorGUI.php.

{
$this->ctrl->returnToParent($this);
}
ilPageEditorGUI::setEnableAnchors (   $a_val)

Set enable anchors.

Parameters
booleananchors

Definition at line 171 of file class.ilPageEditorGUI.php.

{
$this->enable_anchors = $a_val;
}
ilPageEditorGUI::setEnableInternalLinks (   $a_val)

Set enable internal links.

Parameters
booleanenable internal links

Definition at line 131 of file class.ilPageEditorGUI.php.

{
$this->enable_internal_links = $a_val;
}
ilPageEditorGUI::setEnableKeywords (   $a_val)

Set enable keywords handling.

Parameters
booleankeywords handling

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

{
$this->enable_keywords = $a_val;
}
ilPageEditorGUI::setHeader (   $a_header)

set header title

Parameters
string$a_headerheader title

Definition at line 76 of file class.ilPageEditorGUI.php.

{
$this->header = $a_header;
}
ilPageEditorGUI::setIntLinkHelpDefault (   $a_type,
  $a_id 
)

Definition at line 109 of file class.ilPageEditorGUI.php.

{
$this->int_link_def_type = $a_type;
$this->int_link_def_id = $a_id;
}
ilPageEditorGUI::setIntLinkReturn (   $a_return)

Definition at line 115 of file class.ilPageEditorGUI.php.

{
$this->int_link_return = $a_return;
}
ilPageEditorGUI::setLocator ( $a_locator)

set locator object

Parameters
object$a_locatorlocator object

Definition at line 96 of file class.ilPageEditorGUI.php.

{
$this->locator =& $a_locator;
}
ilPageEditorGUI::setMediaMode ( )

set media and editing mode

Definition at line 835 of file class.ilPageEditorGUI.php.

References $_POST, and $ilias.

{
global $ilUser, $ilias;
$ilUser->writePref("ilPageEditor_MediaMode", $_POST["media_mode"]);
$ilUser->writePref("ilPageEditor_HTMLMode", $_POST["html_mode"]);
if ($ilUser->getPref("ilPageEditor_JavaScript") != $_POST["js_mode"])
{
// not nice, should be solved differently in the future
if ($this->page->getParentType() == "lm" ||
$this->page->getParentType() == "dbk")
{
$this->ctrl->setParameterByClass("illmpageobjectgui", "reloadTree", "y");
}
}
$ilUser->writePref("ilPageEditor_JavaScript", $_POST["js_mode"]);
// again not so nice...
if ($this->page->getParentType() == "lm" ||
$this->page->getParentType() == "dbk")
{
$this->ctrl->redirectByClass("illmpageobjectgui", "edit");
}
else
{
$this->ctrl->returnToParent($this);
}
}
ilPageEditorGUI::setPageBackTitle (   $a_title)

Definition at line 121 of file class.ilPageEditorGUI.php.

{
$this->page_back_title = $a_title;
}
ilPageEditorGUI::showSnippetInfo ( )

Show snippet info.

Definition at line 1208 of file class.ilPageEditorGUI.php.

References $_POST, $ilCtrl, $lng, $tpl, ilObject\_getAllReferences(), ilObject\_lookupTitle(), ilMediaPoolItem\getPoolForItemId(), and ilMediaPoolPage\lookupTitle().

{
global $tpl, $lng, $ilAccess, $ilCtrl;
$stpl = new ilTemplate("tpl.snippet_info.html", true, true, "Services/COPage");
include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
$mep_pools = ilMediaPoolItem::getPoolForItemId($_POST["ci_id"]);
foreach ($mep_pools as $mep_id)
{
$ref_ids = ilObject::_getAllReferences($mep_id);
$edit_link = false;
foreach ($ref_ids as $rid)
{
if (!$edit_link && $ilAccess->checkAccess("write", "", $rid))
{
$stpl->setCurrentBlock("edit_link");
$stpl->setVariable("TXT_EDIT", $lng->txt("edit"));
$stpl->setVariable("HREF_EDIT",
"./goto.php?target=mep_".$rid);
$stpl->parseCurrentBlock();
}
}
$stpl->setCurrentBlock("pool");
$stpl->setVariable("TXT_MEDIA_POOL", $lng->txt("obj_mep"));
$stpl->setVariable("VAL_MEDIA_POOL", ilObject::_lookupTitle($mep_id));
$stpl->parseCurrentBlock();
}
include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
$stpl->setVariable("TXT_TITLE", $lng->txt("title"));
$stpl->setVariable("VAL_TITLE", ilMediaPoolPage::lookupTitle($_POST["ci_id"]));
$stpl->setVariable("TXT_BACK", $lng->txt("back"));
$stpl->setVariable("HREF_BACK",
$ilCtrl->getLinkTargetByClass("ilpageobjectgui", "edit"));
$tpl->setContent($stpl->get());
}

+ Here is the call graph for this function:

Field Documentation

ilPageEditorGUI::$cont_obj
ilPageEditorGUI::$ctrl

Definition at line 36 of file class.ilPageEditorGUI.php.

ilPageEditorGUI::$enable_anchors

Definition at line 45 of file class.ilPageEditorGUI.php.

Referenced by getEnableAnchors().

ilPageEditorGUI::$enable_keywords

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

Referenced by getEnableKeywords().

ilPageEditorGUI::$header

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

Referenced by getHeader().

ilPageEditorGUI::$ilias

Definition at line 33 of file class.ilPageEditorGUI.php.

Referenced by _doJSEditing(), ilPageEditorGUI(), and setMediaMode().

ilPageEditorGUI::$objDefinition

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

Referenced by ilPageEditorGUI().

ilPageEditorGUI::$page

Definition at line 38 of file class.ilPageEditorGUI.php.

ilPageEditorGUI::$return_location

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

ilPageEditorGUI::$tabs

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

ilPageEditorGUI::$target_script

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

ilPageEditorGUI::$tpl

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