ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilEditClipboardGUI Class Reference

Class ilEditClipboardGUI. More...

+ Collaboration diagram for ilEditClipboardGUI:

Public Member Functions

 ilEditClipboardGUI ()
 Constructor public.
 _forwards ()
 get all gui classes that are called from this one (see class ilCtrl)
executeCommand ()
 execute command
 setMultipleSelections ($a_multiple=true)
 set, if multiple selections are enabled
 getMultipleSelections ()
 check wether multiple selections are enabled
 setInsertButtonTitle ($a_insertbuttontitle)
 Set Insert Button Title.
 getInsertButtonTitle ()
 Get Insert Button Title.
 view ()
 getObject ()
 get Object
 remove ()
 remove item from clipboard
 insert ()
 insert
 _getSelectedIDs ()
 setTabs ()
 output tabs
 setPageBackTitle ($a_title)
 Set title for back link.
 getTabs (&$tabs_gui)
 adds tabs to tab gui object

Detailed Description

Class ilEditClipboardGUI.

Clipboard for editing

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilEditClipboardGUI.php 22160 2009-10-20 14:29:29Z akill

ilEditClipboardGUI: ilObjMediaObjectGUI

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

Member Function Documentation

ilEditClipboardGUI::_forwards ( )

get all gui classes that are called from this one (see class ilCtrl)

Parameters
arrayarray of gui classes that are called

Definition at line 69 of file class.ilEditClipboardGUI.php.

{
return array("ilObjMediaObjectGUI");
}
ilEditClipboardGUI::_getSelectedIDs ( )

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

References $_SESSION.

Referenced by ilObjMediaPoolGUI\insertFromClipboard(), and ilPageEditorGUI\insertFromClipboard().

{
return $_SESSION["ilEditClipboard_mob_id"];
}

+ Here is the caller graph for this function:

& ilEditClipboardGUI::executeCommand ( )

execute command

Definition at line 77 of file class.ilEditClipboardGUI.php.

References $_GET, $cmd, $ilCtrl, $lng, and $ret.

{
global $ilUser, $ilCtrl, $ilTabs, $lng;
$next_class = $ilCtrl->getNextClass($this);
$cmd = $ilCtrl->getCmd();
switch($next_class)
{
case "ilobjmediaobjectgui":
$ilCtrl->setReturn($this, "view");
$ilTabs->clearTargets();
$ilTabs->setBackTarget($lng->txt("back"),
$ilCtrl->getLinkTarget($this, "view"));
require_once("classes/class.ilTabsGUI.php");
//$id = explode(":",$_GET["clip_item_id"]);
$mob_gui =& new ilObjMediaObjectGUI("", $_GET["clip_item_id"],false, false);
$mob_gui->setTabs();
$ret =& $ilCtrl->forwardCommand($mob_gui);
switch($cmd)
{
case "save":
$ilUser->addObjectToClipboard($ret->getId(), "mob", $ret->getTitle());
$ilCtrl->redirect($this, "view");
break;
}
break;
default:
$ret =& $this->$cmd();
break;
}
return $ret;
}
ilEditClipboardGUI::getInsertButtonTitle ( )

Get Insert Button Title.

Returns
string Insert Button Title

Definition at line 144 of file class.ilEditClipboardGUI.php.

References $lng.

{
global $lng;
if ($this->insertbuttontitle == "")
{
return $lng->txt("insert");
}
return $this->insertbuttontitle;
}
ilEditClipboardGUI::getMultipleSelections ( )

check wether multiple selections are enabled

Definition at line 124 of file class.ilEditClipboardGUI.php.

Referenced by insert().

{
return $this->multiple;
}

+ Here is the caller graph for this function:

ilEditClipboardGUI::getObject ( )

get Object

Definition at line 180 of file class.ilEditClipboardGUI.php.

References view().

{
$this->mode = "getObject";
$this->view();
}

+ Here is the call graph for this function:

ilEditClipboardGUI::getTabs ( $tabs_gui)

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Definition at line 273 of file class.ilEditClipboardGUI.php.

References $ilCtrl.

Referenced by setTabs().

{
global $ilCtrl;
// back to upper context
$tabs_gui->setBackTarget($this->page_back_title,
$ilCtrl->getParentReturn($this));
}

+ Here is the caller graph for this function:

ilEditClipboardGUI::ilEditClipboardGUI ( )

Constructor public.

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

References $_GET, $ilCtrl, and $lng.

{
global $lng, $ilCtrl;
$this->multiple = false;
$this->page_back_title = $lng->txt("cont_back");
if ($_GET["returnCommand"] != "")
{
$this->mode = "getObject";
}
else
{
$this->mode = "";
}
$ilCtrl->setParameter($this, "returnCommand",
rawurlencode($_GET["returnCommand"]));
$ilCtrl->saveParameter($this, array("clip_item_id"));
}
ilEditClipboardGUI::insert ( )

insert

Definition at line 221 of file class.ilEditClipboardGUI.php.

References $_GET, $_POST, $_SESSION, $lng, getMultipleSelections(), and ilUtil\redirect().

{
global $ilias, $lng;
// check number of objects
if (!isset($_POST["id"]))
{
$ilias->raiseError($lng->txt("no_checkbox"),$ilias->error_obj->MESSAGE);
}
if (!$this->getMultipleSelections())
{
if(count($_POST["id"]) > 1)
{
$ilias->raiseError($lng->txt("cont_select_max_one_item"),$ilias->error_obj->MESSAGE);
}
}
$_SESSION["ilEditClipboard_mob_id"] = $_POST["id"];
ilUtil::redirect($_GET["returnCommand"]);
}

+ Here is the call graph for this function:

ilEditClipboardGUI::remove ( )

remove item from clipboard

Definition at line 190 of file class.ilEditClipboardGUI.php.

References $_POST, $ilCtrl, and $lng.

{
global $ilias, $ilUser, $lng, $ilCtrl;
// check number of objects
if (!isset($_POST["id"]))
{
$ilias->raiseError($lng->txt("no_checkbox"),$ilias->error_obj->MESSAGE);
}
foreach($_POST["id"] AS $obj_id)
{
$id = explode(":", $obj_id);
if ($id[0] == "mob")
{
$ilUser->removeObjectFromClipboard($id[1], "mob");
include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
$mob = new ilObjMediaObject($id[1]);
$mob->delete(); // this method don't delete, if mob is used elsewhere
}
if ($id[0] == "incl")
{
$ilUser->removeObjectFromClipboard($id[1], "incl");
}
}
$ilCtrl->redirect($this, "view");
}
ilEditClipboardGUI::setInsertButtonTitle (   $a_insertbuttontitle)

Set Insert Button Title.

Parameters
string$a_insertbuttontitleInsert Button Title

Definition at line 134 of file class.ilEditClipboardGUI.php.

{
$this->insertbuttontitle = $a_insertbuttontitle;
}
ilEditClipboardGUI::setMultipleSelections (   $a_multiple = true)

set, if multiple selections are enabled

Definition at line 116 of file class.ilEditClipboardGUI.php.

{
$this->multiple = $a_multiple;
}
ilEditClipboardGUI::setPageBackTitle (   $a_title)

Set title for back link.

Definition at line 263 of file class.ilEditClipboardGUI.php.

{
$this->page_back_title = $a_title;
}
ilEditClipboardGUI::setTabs ( )

output tabs

Definition at line 251 of file class.ilEditClipboardGUI.php.

References $lng, $tpl, ilUtil\getImagePath(), and getTabs().

{
global $ilTabs, $lng, $tpl;
$tpl->setTitleIcon(ilUtil::getImagePath("icon_clip_b.gif"));
$tpl->setTitle($lng->txt("clipboard"));
$this->getTabs($ilTabs);
}

+ Here is the call graph for this function:

ilEditClipboardGUI::view ( )

Definition at line 159 of file class.ilEditClipboardGUI.php.

References $ilCtrl, $lng, and $tpl.

Referenced by getObject().

{
global $tree, $ilUser, $ilCtrl, $lng, $tpl;
$tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
$tpl->setCurrentBlock("btn_cell");
$tpl->setVariable("BTN_LINK",
$ilCtrl->getLinkTargetByClass("ilobjmediaobjectgui", "create"));
$tpl->setVariable("BTN_TXT", $lng->txt("cont_create_mob"));
$tpl->parseCurrentBlock();
include_once("./Services/Clipboard/classes/class.ilClipboardTableGUI.php");
$table_gui = new ilClipboardTableGUI($this, "view");
$tpl->setContent($table_gui->getHTML());
}

+ Here is the caller graph for this function:


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