ILIAS  Release_5_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 54848 2014-11-06 09:07:53Z akill

ilEditClipboardGUI: ilObjMediaObjectGUI

Definition at line 18 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 50 of file class.ilEditClipboardGUI.php.

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

Definition at line 220 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 58 of file class.ilEditClipboardGUI.php.

References $_GET, $cmd, $ilCtrl, $ilUser, $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"));
$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 123 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 103 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 157 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 249 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 24 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 198 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 167 of file class.ilEditClipboardGUI.php.

References $_POST, $ilCtrl, $ilUser, 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 113 of file class.ilEditClipboardGUI.php.

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

set, if multiple selections are enabled

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

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

Set title for back link.

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

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

output tabs

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

References $lng, $tpl, and getTabs().

{
global $ilTabs, $lng, $tpl;
$tpl->setTitle($lng->txt("clipboard"));
$this->getTabs($ilTabs);
}

+ Here is the call graph for this function:

ilEditClipboardGUI::view ( )

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

References $ilCtrl, $ilUser, $lng, $tpl, and ilLinkButton\getInstance().

Referenced by getObject().

{
global $tree, $ilUser, $ilCtrl, $lng, $tpl, $ilToolbar;
include_once("./Services/UIComponent/Button/classes/class.ilLinkButton.php");
$but->setUrl($ilCtrl->getLinkTargetByClass("ilobjmediaobjectgui", "create"));
$but->setCaption("cont_create_mob");
$ilToolbar->addButtonInstance($but);
include_once("./Services/Clipboard/classes/class.ilClipboardTableGUI.php");
$table_gui = new ilClipboardTableGUI($this, "view");
$tpl->setContent($table_gui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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