ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjMediaPoolGUI Class Reference

User Interface class for media pool objects. More...

+ Inheritance diagram for ilObjMediaPoolGUI:
+ Collaboration diagram for ilObjMediaPoolGUI:

Public Member Functions

 ilObjMediaPoolGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=false)
 Constructor.
executeCommand ()
 execute command
 createObject ()
 create new object form
 createMediaObject ()
 view ()
 saveObject ()
 save object public
 editObject ()
 edit properties of object (admin form)
 edit ()
 edit properties of object (module form)
 cancel ()
 cancel editing
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 update ()
 update properties
 afterUpdate ()
 listMedia ()
 list media objects
 getTemplate ()
 Get standard template.
 getParentFolderId ()
 Get folder parent ID.
 showUpperIcon ()
 show upper icon (standard procedure will work, if no obj_id is given)
 frameset ()
 output main frameset of media pool left frame: explorer tree of folders right frame: media pool content
 infoScreenFrameset ()
 output main frameset of media pool left frame: explorer tree of folders right frame: media pool content
 explorer ()
 output explorer tree
 showMedia ()
 show media object
 showFullscreen ()
 show fullscreen
 confirmRemove ()
 confirm remove of mobs
 openClipboard ()
 paste from clipboard
 insertFromClipboard ()
 insert media object from clipboard
 cancelRemove ()
 cancel deletion of media objects/folders
 remove ()
 confirm deletion of
 copyToClipboard ()
 copy media objects to clipboard
 addLocatorItems ()
 add locator items for media pool
 createFolderForm ()
 create folder form
 setTabs ()
 output tabs
 getTabs (&$tabs_gui)
 adds tabs to tab gui object
 _goto ($a_target)
 goto target media pool
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed
 infoScreen ()
 show information screen
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showMountWebfolderIcon ()
 setAdminTabs ()
 set admin tabs public
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 setActions ($a_actions="")
 set possible actions for objects in list.
 setSubObjects ($a_sub_objects="")
 set possible subobjects for this object.
 setLocator ()
 set Locator
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 undeleteObject ()
 get object back from trash
 insertSavedNodes ($a_source_id, $a_dest_id, $a_tree_id, &$a_affected_ids)
 recursive method to insert all saved nodes of the clipboard (maybe this function could be moved to a rbac class ?)
 confirmedDeleteObject ()
 confirmed deletion if object -> objects are moved to trash
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 removeDeletedNodes ($a_node_id, $a_checked, $a_delete_objects, &$a_affected_ids)
 remove already deleted objects within the objects in trash recursive function
 importObject ()
 import new object form
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 updateObject ()
 updates object entry in object_data
 permObject ()
 show permissions of current node
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 permSaveObject ()
 save permissions
 isVisible ($a_ref_id, $a_type)
 displayList ()
 display object list
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 display deletion confirmation screen only for referenced objects.
 trashObject ()
 show trash content of object
 addRoleObject ()
 adds a local role This method is only called when choose the option 'you may add local roles'.
 showActions ($with_subobjects=false)
 show possible action (form buttons)
 getActions ()
 Get Actions.
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 __showClipboardTable ($a_result_set, $a_from="")
 infoObject ()
 __buildRoleFilterSelect ()
 __filterRoles ($a_roles, $a_filter)
 ownerObject ()
 changeOwnerObject ()
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 Add an object search in case the number of existing objects is too big to offer a selection list.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

Data Fields

 $output_prepared
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 searchCloneSourceObject ()
 Search clone source by title.
 buildCloneSelect ($existing_objs)
 Build a select box for clonable objects (permission write)

Detailed Description

Member Function Documentation

ilObjMediaPoolGUI::_goto (   $a_target)

goto target media pool

Definition at line 936 of file class.ilObjMediaPoolGUI.php.

References $_GET, $ilErr, ilObjectGUI\$lng, ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendInfo().

{
global $ilAccess, $ilErr, $lng;
if ($ilAccess->checkAccess("read", "", $a_target))
{
$_GET["cmd"] = "frameset";
$_GET["baseClass"] = "ilMediaPoolPresentationGUI";
$_GET["ref_id"] = $a_target;
include("ilias.php");
} else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
$_GET["cmd"] = "frameset";
$_GET["target"] = "";
$_GET["ref_id"] = ROOT_FOLDER_ID;
ilUtil::sendInfo(sprintf($lng->txt("msg_no_perm_read_item"),
include("repository.php");
}
$ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::addLocatorItems ( )

add locator items for media pool

Reimplemented from ilObjectGUI.

Definition at line 820 of file class.ilObjMediaPoolGUI.php.

References $_GET, ilObjectGUI\$obj_id, $title, ilObjectGUI\$tree, and ilObjectGUI\getCreationMode().

{
global $ilLocator;
if (!$this->getCreationMode() && $this->ctrl->getCmd() != "explorer")
{
$tree =& $this->object->getTree();
$obj_id = ($_GET["obj_id"] == "")
? $tree->getRootId()
: $_GET["obj_id"];
$path = $tree->getPathFull($obj_id);
foreach($path as $node)
{
if ($node["child"] == $tree->getRootId())
{
$this->ctrl->setParameter($this, "obj_id", "");
$link = $this->ctrl->getLinkTarget($this, "listMedia");
$title = $this->object->getTitle();
$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
$ilLocator->addItem($title, $link, "", $_GET["ref_id"]);
}
else
{
$this->ctrl->setParameter($this, "obj_id", $node["child"]);
$link = $this->ctrl->getLinkTarget($this, "listMedia");
$title = $node["title"];
$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
$ilLocator->addItem($title, $link);
}
}
}
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::afterUpdate ( )

Reimplemented from ilObjectGUI.

Definition at line 384 of file class.ilObjMediaPoolGUI.php.

{
$this->ctrl->redirect($this, "listMedia");
}
ilObjMediaPoolGUI::cancel ( )

cancel editing

Definition at line 351 of file class.ilObjMediaPoolGUI.php.

{
$this->ctrl->redirect($this, "listMedia");
}
ilObjMediaPoolGUI::cancelObject (   $in_rep = false)

cancel action and go back to previous page public

Reimplemented from ilObjectGUI.

Definition at line 361 of file class.ilObjMediaPoolGUI.php.

References $_GET, ilUtil\redirect(), and ilUtil\sendInfo().

{
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
ilUtil::redirect("repository.php?cmd=frameset&ref_id=".$_GET["ref_id"]);
//$this->ctrl->redirectByClass("ilrepositorygui", "frameset");
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::cancelRemove ( )

cancel deletion of media objects/folders

Definition at line 753 of file class.ilObjMediaPoolGUI.php.

{
session_unregister("ilMepRemove");
$this->ctrl->redirect($this, "listMedia");
}
ilObjMediaPoolGUI::confirmRemove ( )

confirm remove of mobs

Definition at line 639 of file class.ilObjMediaPoolGUI.php.

References $_SESSION, ilObjectGUI\$obj_id, $title, ilObject\_lookupTitle(), ilObject\_lookupType(), ilUtil\getImagePath(), ilUtil\sendInfo(), and ilUtil\switchColor().

{
global $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
//$this->prepareOutput();
// SAVE POST VALUES
$_SESSION["ilMepRemove"] = $_POST["id"];
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.confirm_deletion.html", "Modules/MediaPool");
ilUtil::sendInfo($this->lng->txt("info_delete_sure"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
// BEGIN TABLE HEADER
$this->tpl->setCurrentBlock("table_header");
$this->tpl->setVariable("TEXT",$this->lng->txt("objects"));
$this->tpl->parseCurrentBlock();
// BEGIN TABLE DATA
$counter = 0;
foreach($_POST["id"] as $obj_id)
{
$type = ilObject::_lookupType($obj_id);
$this->tpl->setCurrentBlock("table_row");
$this->tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,"tblrow1","tblrow2"));
$this->tpl->setVariable("TEXT_CONTENT", $title);
$this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_".$type.".gif"));
$this->tpl->parseCurrentBlock();
}
// cancel/confirm button
$this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$buttons = array( "cancelRemove" => $this->lng->txt("cancel"),
"remove" => $this->lng->txt("confirm"));
foreach ($buttons as $name => $value)
{
$this->tpl->setCurrentBlock("operation_btn");
$this->tpl->setVariable("BTN_NAME",$name);
$this->tpl->setVariable("BTN_VALUE",$value);
$this->tpl->parseCurrentBlock();
}
$this->tpl->show();
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::copyToClipboard ( )

copy media objects to clipboard

Definition at line 785 of file class.ilObjMediaPoolGUI.php.

References ilObjectGUI\$obj_id, ilObject\_lookupType(), and ilUtil\sendInfo().

{
global $ilUser, $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
if(!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
foreach ($_POST["id"] as $obj_id)
{
$type = ilObject::_lookupType($obj_id);
if ($type == "fold")
{
$this->ilias->raiseError($this->lng->txt("cont_cant_copy_folders"), $this->ilias->error_obj->MESSAGE);
}
}
foreach ($_POST["id"] as $obj_id)
{
$ilUser->addObjectToClipboard($obj_id, "mob", "");
}
ilUtil::sendInfo($this->lng->txt("copied_to_clipboard"),true);
$this->ctrl->redirect($this, "listMedia");
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::createFolderForm ( )

create folder form

Definition at line 856 of file class.ilObjMediaPoolGUI.php.

References $_GET.

{
global $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$folder_gui =& new ilObjFolderGUI("", 0, false, false);
$this->ctrl->setParameterByClass("ilobjfoldergui", "obj_id", $_GET["obj_id"]);
$folder_gui->setFormAction("save",
$this->ctrl->getFormActionByClass("ilobjfoldergui"));
$folder_gui->createObject();
$this->tpl->show();
}
ilObjMediaPoolGUI::createMediaObject ( )

Definition at line 281 of file class.ilObjMediaPoolGUI.php.

{
$this->ctrl->redirectByClass("ilobjmediaobjectgui", "create");
}
ilObjMediaPoolGUI::createObject ( )

create new object form

public

Reimplemented from ilObjectGUI.

Definition at line 274 of file class.ilObjMediaPoolGUI.php.

References ilFrameTargetInfo\_getFrame().

{
$this->tpl->setVariable("TARGET", ' target="'.
ilFrameTargetInfo::_getFrame("MainContent").'" ');
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::edit ( )

edit properties of object (module form)

Definition at line 342 of file class.ilObjMediaPoolGUI.php.

References editObject().

{
$this->editObject();
$this->tpl->show();
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::editObject ( )

edit properties of object (admin form)

public

Reimplemented from ilObjectGUI.

Definition at line 324 of file class.ilObjMediaPoolGUI.php.

References ilObjectGUI\$tpl, and ilObjectGUI\$tree.

Referenced by edit().

{
global $ilAccess, $tree, $tpl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
// edit button
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
}

+ Here is the caller graph for this function:

& ilObjMediaPoolGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 84 of file class.ilObjMediaPoolGUI.php.

References $_GET, $cmd, ilObjectGUI\$lng, $ret, ilObjectGUI\$tree, explorer(), ilObjectGUI\getCreationMode(), getParentFolderId(), getTemplate(), infoScreen(), ilObjectGUI\prepareOutput(), ilUtil\redirect(), ilUtil\sendInfo(), ilObjectGUI\setCreationMode(), and ilObjectGUI\setLocator().

{
global $ilTabs, $lng;
if ($this->ctrl->getRedirectSource() == "ilinternallinkgui")
{
$this->explorer();
return;
}
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$new_type = $_POST["new_type"]
? $_POST["new_type"]
: $_GET["new_type"];
if ($new_type != "" && ($cmd != "confirmRemove" && $cmd != "copyToClipboard"
&& $cmd != "pasteFromClipboard"))
{
$this->setCreationMode(true);
}
if (!$this->getCreationMode())
{
$tree =& $this->object->getTree();
if ($_GET["obj_id"] == "")
{
$_GET["obj_id"] = $tree->getRootId();
}
}
if ($cmd == "create")
{
switch($_POST["new_type"])
{
case "mob":
$this->ctrl->redirectByClass("ilobjmediaobjectgui", "create");
break;
case "fold":
$this->ctrl->redirectByClass("ilobjfoldergui", "create");
break;
}
}
switch($next_class)
{
case "ilobjmediaobjectgui":
//$cmd.="Object";
if ($cmd == "create" || $cmd == "save" || $cmd == "cancel")
{
$ret_obj = $_GET["obj_id"];
$ilObjMediaObjectGUI =& new ilObjMediaObjectGUI("", 0, false, false);
}
else
{
$ret_obj = $tree->getParentId($_GET["obj_id"]);
$ilObjMediaObjectGUI =& new ilObjMediaObjectGUI("", $_GET["obj_id"], false, false);
$this->ctrl->setParameter($this, "obj_id", $this->getParentFolderId());
$ilTabs->setBackTarget($lng->txt("back"),
$this->ctrl->getLinkTarget($this, "listMedia"));
}
if ($this->ctrl->getCmdClass() == "ilinternallinkgui")
{
$this->ctrl->setReturn($this, "explorer");
}
else
{
$this->ctrl->setParameter($this, "obj_id", $ret_obj);
$this->ctrl->setReturn($this, "listMedia");
$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
}
$this->getTemplate();
$ilObjMediaObjectGUI->setAdminTabs();
$this->setLocator();
//echo ":".$tree->getParentId($_GET["obj_id"]).":";
//$ret =& $ilObjMediaObjectGUI->executeCommand();
$ret =& $this->ctrl->forwardCommand($ilObjMediaObjectGUI);
//echo "<br>ilObjMediaPoolGUI:afterexecute:<br>"; exit;
switch($cmd)
{
case "save":
$parent = ($_GET["obj_id"] == "")
? $tree->getRootId()
: $_GET["obj_id"];
$tree->insertNode($ret->getId(), $parent);
ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=".
$_GET["ref_id"]."&obj_id=".$_GET["obj_id"]);
break;
default:
$this->tpl->show();
break;
}
break;
case "ilobjfoldergui":
$folder_gui = new ilObjFolderGUI("", 0, false, false);
$this->ctrl->setReturn($this, "listMedia");
$cmd.="Object";
//echo "-$cmd-";
switch($cmd)
{
case "createObject":
$this->prepareOutput();
$folder_gui =& new ilObjFolderGUI("", 0, false, false);
$folder_gui->setFormAction("save",
$this->ctrl->getFormActionByClass("ilobjfoldergui"));
$folder_gui->createObject();
$this->tpl->show();
break;
case "saveObject":
//$folder_gui->setReturnLocation("save", $this->ctrl->getLinkTarget($this, "listMedia"));
$parent = ($_GET["obj_id"] == "")
? $tree->getRootId()
: $_GET["obj_id"];
$folder_gui->setFolderTree($tree);
$folder_gui->saveObject($parent);
//$this->ctrl->redirect($this, "listMedia");
break;
case "editObject":
$this->prepareOutput();
$folder_gui =& new ilObjFolderGUI("", $_GET["obj_id"], false, false);
$this->ctrl->setParameter($this, "foldereditmode", "1");
$folder_gui->setFormAction("update", $this->ctrl->getFormActionByClass("ilobjfoldergui"));
$folder_gui->editObject();
$this->tpl->show();
break;
case "updateObject":
$folder_gui =& new ilObjFolderGUI("", $_GET["obj_id"], false, false);
$this->ctrl->setParameter($this, "obj_id", $this->getParentFolderId());
$this->ctrl->setReturn($this, "listMedia");
$folder_gui->updateObject(true); // this returns to parent
break;
case "cancelObject":
ilUtil::sendInfo($this->lng->txt("action_aborted"), true);
if ($_GET["foldereditmode"])
{
$this->ctrl->setParameter($this, "obj_id", $this->getParentFolderId());
}
$this->ctrl->redirect($this, "listMedia");
break;
}
break;
case "ileditclipboardgui":
$this->prepareOutput();
$this->ctrl->setReturn($this, "listMedia");
$clip_gui = new ilEditClipboardGUI();
$clip_gui->setMultipleSelections(true);
$clip_gui->setInsertButtonTitle($lng->txt("mep_copy_to_mep"));
$ilTabs->setTabActive("clipboard");
//$ret =& $clip_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($clip_gui);
$this->tpl->show();
break;
case 'ilinfoscreengui':
$this->prepareOutput();
$this->infoScreen();
break;
case 'ilpermissiongui':
$this->prepareOutput();
include_once("./classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
$this->tpl->show();
break;
default:
$this->prepareOutput();
$cmd = $this->ctrl->getCmd("frameset");
if ($this->creation_mode)
{
$cmd.= "Object";
}
$this->$cmd();
break;
}
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::explorer ( )

output explorer tree

Definition at line 506 of file class.ilObjMediaPoolGUI.php.

References $_GET, ilObjectGUI\$object, ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), IL_FM_POSITIVE, and ilExplorer\setTargetGet().

Referenced by executeCommand().

{
global $ilAccess;
$_GET["obj_id"] = "";
if (!$ilAccess->checkAccess("read", "", $this->object->getRefId()) ||
!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
return;
}
$this->tpl = new ilTemplate("tpl.main.html", true, true);
$this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
$this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.gif", false));
require_once ("./Modules/MediaPool/classes/class.ilMediaPoolExplorer.php");
//echo "-".$this->ctrl->getLinkTarget($this, "listMedia")."-";
$exp = new ilMediaPoolExplorer($this->ctrl->getLinkTarget($this, "listMedia"), $this->object);
$exp->setTargetGet("obj_id");
$exp->setExpandTarget($this->ctrl->getLinkTarget($this, "explorer"));
$exp->addFilter("root");
$exp->addFilter("fold");
$exp->setFiltered(true);
$exp->setFilterMode(IL_FM_POSITIVE);
if ($_GET["mepexpand"] == "")
{
$mep_tree =& $this->object->getTree();
$expanded = $mep_tree->readRootId();
}
else
{
$expanded = $_GET["mepexpand"];
}
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
$this->tpl->setCurrentBlock("content");
$this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("cont_mep_structure"));
$this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
$this->tpl->setVariable("EXPLORER",$output);
$this->ctrl->setParameter($this, "mepexpand", $_GET["mepexpand"]);
$this->tpl->setVariable("ACTION",
$this->ctrl->getLinkTarget($this, "explorer"));
$this->tpl->parseCurrentBlock();
$this->tpl->show(false);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjMediaPoolGUI::frameset ( )

output main frameset of media pool left frame: explorer tree of folders right frame: media pool content

Definition at line 466 of file class.ilObjMediaPoolGUI.php.

References exit.

{
include_once("Services/Frameset/classes/class.ilFramesetGUI.php");
$fs_gui = new ilFramesetGUI();
$fs_gui->setMainFrameName("content");
$fs_gui->setSideFrameName("tree");
$fs_gui->setMainFrameSource(
$this->ctrl->getLinkTarget($this, "listMedia"));
$this->ctrl->setParameter($this, "expand", "1");
$fs_gui->setSideFrameSource(
$this->ctrl->getLinkTarget($this, "explorer"));
$fs_gui->setFramesetTitle($this->object->getTitle());
$fs_gui->show();
}
ilObjMediaPoolGUI::getParentFolderId ( )

Get folder parent ID.

Definition at line 419 of file class.ilObjMediaPoolGUI.php.

References $_GET.

Referenced by executeCommand(), and showUpperIcon().

{
if ($_GET["obj_id"] == "")
{
return "";
}
$par_id = $this->object->tree->getParentId($_GET["obj_id"]);
if ($par_id != $this->object->tree->getRootId())
{
return $par_id;
}
else
{
return "";
}
}

+ Here is the caller graph for this function:

ilObjMediaPoolGUI::getTabs ( $tabs_gui)

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Reimplemented from ilObjectGUI.

Definition at line 887 of file class.ilObjMediaPoolGUI.php.

References $_GET.

Referenced by setTabs().

{
global $ilAccess;
if ($ilAccess->checkAccess('read', '', $this->ref_id) ||
$ilAccess->checkAccess('write', '', $this->ref_id))
{
$tabs_gui->addTarget("view_content", $this->ctrl->getLinkTarget($this, "listMedia"),
"listMedia", "");
}
// info tab
if ($ilAccess->checkAccess('visible', '', $this->ref_id))
{
$force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui"
|| strtolower($_GET["cmdClass"]) == "ilnotegui")
? true
: false;
//echo "-$force_active-";
$tabs_gui->addTarget("info_short",
$this->ctrl->getLinkTargetByClass(
array("ilobjmediapoolgui", "ilinfoscreengui"), "showSummary"),
array("showSummary", "infoScreen"),
"", "", $force_active);
}
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$tabs_gui->addTarget("edit_properties", $this->ctrl->getLinkTarget($this, "edit"),
"edit", array("", "ilobjmediapoolgui"));
}
if ($ilAccess->checkAccess("edit_permission", "", $this->object->getRefId()))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$tabs_gui->addTarget("clipboard", $this->ctrl->getLinkTarget($this, "openClipboard"),
"view", "ileditclipboardgui");
}
}

+ Here is the caller graph for this function:

ilObjMediaPoolGUI::getTemplate ( )

Get standard template.

Definition at line 410 of file class.ilObjMediaPoolGUI.php.

Referenced by executeCommand().

{
$this->tpl->getStandardTemplate();
}

+ Here is the caller graph for this function:

ilObjMediaPoolGUI::ilObjMediaPoolGUI (   $a_data,
  $a_id = 0,
  $a_call_by_reference = true,
  $a_prepare_output = false 
)

Constructor.

public

Definition at line 55 of file class.ilObjMediaPoolGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

{
global $lng, $ilCtrl, $lng;
//echo "<br>ilobjmediapoolgui-constructor-id-$a_id";
$this->ctrl =& $ilCtrl;
$lng->loadLanguageModule("mep");
if ($this->ctrl->getCmd() == "explorer")
{
$this->ctrl->saveParameter($this, array("ref_id"));
}
else
{
$this->ctrl->saveParameter($this, array("ref_id", "obj_id"));
}
$this->type = "mep";
$lng->loadLanguageModule("content");
parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
$this->output_prepared = $a_prepare_output;
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::infoScreen ( )

show information screen

Definition at line 976 of file class.ilObjMediaPoolGUI.php.

References $_GET.

Referenced by executeCommand(), and infoScreenObject().

{
global $ilAccess;
if (!$ilAccess->checkAccess("visible", "", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
}
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
//$info->enableNews();
}
// no news editing for files, just notifications
// $info->enableNewsEditing(false);
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
{
// $news_set = new ilSetting("news");
// $enable_internal_rss = $news_set->get("enable_rss_for_internal");
// if ($enable_internal_rss)
// {
// $info->setBlockProperty("news", "settings", true);
// $info->setBlockProperty("news", "public_notifications_option", true);
// }
}
// standard meta data
$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
// forward the command
$this->ctrl->forwardCommand($info);
$this->tpl->show();
}

+ Here is the caller graph for this function:

ilObjMediaPoolGUI::infoScreenFrameset ( )

output main frameset of media pool left frame: explorer tree of folders right frame: media pool content

Definition at line 487 of file class.ilObjMediaPoolGUI.php.

References exit.

{
include_once("Services/Frameset/classes/class.ilFramesetGUI.php");
$fs_gui = new ilFramesetGUI();
$fs_gui->setMainFrameName("content");
$fs_gui->setSideFrameName("tree");
$fs_gui->setMainFrameSource(
$this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
$this->ctrl->setParameter($this, "expand", "1");
$fs_gui->setSideFrameSource(
$this->ctrl->getLinkTarget($this, "explorer"));
$fs_gui->setFramesetTitle($this->object->getTitle());
$fs_gui->show();
}
ilObjMediaPoolGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 966 of file class.ilObjMediaPoolGUI.php.

References infoScreen().

{
$this->ctrl->setCmd("showSummary");
$this->ctrl->setCmdClass("ilinfoscreengui");
$this->infoScreen();
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::insertFromClipboard ( )

insert media object from clipboard

Definition at line 718 of file class.ilObjMediaPoolGUI.php.

References $_GET, ilEditClipboardGUI\_getSelectedIDs(), ilObject\_lookupTitle(), and ilUtil\sendInfo().

{
global $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
include_once("./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
$not_inserted = array();
if (is_array($ids))
{
foreach ($ids as $id)
{
if (!$this->object->insertInTree($id, $_GET["obj_id"]))
{
$not_inserted[] = ilObject::_lookupTitle($id)." [".
$id."]";
}
}
}
if (count($not_inserted) > 0)
{
ilUtil::sendInfo($this->lng->txt("mep_not_insert_already_exist")."<br>".
implode($not_inserted,"<br>"), true);
}
$this->ctrl->redirect($this, "listMedia");
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::listMedia ( )

list media objects

Definition at line 392 of file class.ilObjMediaPoolGUI.php.

References ilObjectGUI\$tpl, and ilObjectGUI\$tree.

{
global $tree, $ilAccess, $tpl;
if (!$ilAccess->checkAccess("read", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
$mep_table_gui = new ilMediaPoolTableGUI($this, "listMedia", $this->object);
$tpl->setContent($mep_table_gui->getHTML());
$this->tpl->show();
}
ilObjMediaPoolGUI::openClipboard ( )

paste from clipboard

Definition at line 699 of file class.ilObjMediaPoolGUI.php.

References $ilCtrl.

{
global $ilCtrl, $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$ilCtrl->setParameterByClass("ileditclipboardgui", "returnCommand",
rawurlencode($ilCtrl->getLinkTarget($this,
"insertFromClipboard")));
$ilCtrl->redirectByClass("ilEditClipboardGUI", "getObject");
}
ilObjMediaPoolGUI::remove ( )

confirm deletion of

Definition at line 762 of file class.ilObjMediaPoolGUI.php.

References $_SESSION, ilObjectGUI\$obj_id, and ilUtil\sendInfo().

{
global $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
foreach($_SESSION["ilMepRemove"] as $obj_id)
{
$this->object->deleteChild($obj_id);
}
ilUtil::sendInfo($this->lng->txt("cont_obj_removed"),true);
session_unregister("ilMepRemove");
$this->ctrl->redirect($this, "listMedia");
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::saveObject ( )

save object public

Reimplemented from ilObjectGUI.

Definition at line 296 of file class.ilObjMediaPoolGUI.php.

References ilUtil\redirect(), and ilUtil\sendInfo().

{
global $rbacadmin;
// create and insert forum in objecttree
$newObj = parent::saveObject();
// setup rolefolder & default local roles
//$roles = $newObj->initDefaultRoles();
// ...finally assign role to creator of object
//$rbacadmin->assignUser($roles[0], $newObj->getOwner(), "y");
// put here object specific stuff
// always send a message
ilUtil::sendInfo($this->lng->txt("object_added"),true);
//ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=".$newObj->getRefId());
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::setTabs ( )

output tabs

Reimplemented from ilObjectGUI.

Definition at line 877 of file class.ilObjMediaPoolGUI.php.

References getTabs().

{
$this->getTabs($this->tabs_gui);
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::showFullscreen ( )

show fullscreen

Definition at line 631 of file class.ilObjMediaPoolGUI.php.

References showMedia().

{
$this->showMedia();
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::showMedia ( )

show media object

Definition at line 568 of file class.ilObjMediaPoolGUI.php.

References $_GET, ilMediaItem\_getMapAreasIntLinks(), ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), ilUtil\getWebspaceDir(), IL_MODE_ALIAS, IL_MODE_OUTPUT, xslt_create(), xslt_error(), xslt_free(), and xslt_process().

Referenced by showFullscreen().

{
global $ilAccess;
if (!$ilAccess->checkAccess("read", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->tpl =& new ilTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
include_once("Services/Style/classes/class.ilObjStyleSheet.php");
$this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
//$int_links = $page_object->getInternalLinks();
$med_links = ilMediaItem::_getMapAreasIntLinks($_GET["mob_id"]);
// later
//$link_xml = $this->getLinkXML($med_links, $this->getLayoutLinkTargets());
$link_xlm = "";
require_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
$media_obj =& new ilObjMediaObject($_GET["mob_id"]);
$xml = "<dummy>";
// todo: we get always the first alias now (problem if mob is used multiple
// times in page)
$xml.= $media_obj->getXML(IL_MODE_ALIAS);
$xml.= $media_obj->getXML(IL_MODE_OUTPUT);
$xml.= $link_xml;
$xml.="</dummy>";
$xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
$args = array( '/_xml' => $xml, '/_xsl' => $xsl );
$xh = xslt_create();
$wb_path = ilUtil::getWebspaceDir("output");
$mode = ($_GET["cmd"] != "showMedia")
? "fullscreen"
: "media";
$enlarge_path = ilUtil::getImagePath("enlarge.gif", false, "output");
$fullscreen_link =
$this->ctrl->getLinkTarget($this, "showFullscreen");
$params = array ('mode' => $mode, 'enlarge_path' => $enlarge_path,
'link_params' => "ref_id=".$_GET["ref_id"],'fullscreen_link' => $fullscreen_link,
'ref_id' => $_GET["ref_id"], 'pg_frame' => $pg_frame, 'webspace_path' => $wb_path);
$output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
echo xslt_error($xh);
xslt_free($xh);
// unmask user html
$this->tpl->setVariable("MEDIA_CONTENT", $output);
$this->tpl->parseCurrentBlock();
$this->tpl->show();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjMediaPoolGUI::showUpperIcon ( )

show upper icon (standard procedure will work, if no obj_id is given)

Reimplemented from ilObjectGUI.

Definition at line 440 of file class.ilObjMediaPoolGUI.php.

References $_GET, ilObjectGUI\$tpl, and getParentFolderId().

{
global $tpl;
if ($this->ctrl->getCmd() == "explorer")
{
return;
}
$mep_tree =& $this->object->getTree();
if ($_GET["obj_id"] != "" && $_GET["obj_id"] != $mep_tree->getRootId())
{
$this->ctrl->setParameter($this, "obj_id",
$this->getParentFolderId());
$tpl->setUpperIcon($this->ctrl->getLinkTarget($this, "listMedia"));
$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
}
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::update ( )

update properties

Definition at line 372 of file class.ilObjMediaPoolGUI.php.

References ilObjectGUI\updateObject().

{
global $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->updateObject();
}

+ Here is the call graph for this function:

ilObjMediaPoolGUI::view ( )

Definition at line 287 of file class.ilObjMediaPoolGUI.php.

References ilObjectGUI\viewObject().

{
$this->viewObject();
}

+ Here is the call graph for this function:

Field Documentation

ilObjMediaPoolGUI::$output_prepared

Definition at line 48 of file class.ilObjMediaPoolGUI.php.


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