ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjMediaPoolGUI Class Reference

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

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

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 getType ()
 Get type. More...
 
 executeCommand ()
 execute command More...
 
 createMediaObject ()
 obsolete? More...
 
 afterSave (ilObject $newObj)
 save object More...
 
 edit ()
 Edit. More...
 
 listMedia ()
 list media objects More...
 
 allMedia ()
 list all objects More...
 
 applyFilter ()
 Apply filter. More...
 
 resetFilter ()
 Reset filter. More...
 
 getTemplate ()
 Get standard template. More...
 
 getParentFolderId ()
 Get folder parent ID. More...
 
 showPage ()
 Show page. More...
 
 showPreview ()
 Show content snippet. More...
 
 showFullscreen ()
 show fullscreen More...
 
 confirmRemove ()
 confirm remove of mobs More...
 
 openClipboard ()
 paste from clipboard More...
 
 insertFromClipboard ()
 insert media object from clipboard More...
 
 cancelRemove ()
 cancel deletion of media objects/folders More...
 
 remove ()
 confirm deletion of More...
 
 copyToClipboard ()
 copy media objects to clipboard More...
 
 addLocatorItems ()
 add locator items for media pool More...
 
 createFolderForm ()
 create folder form More...
 
 editFolder ()
 Edit folder. More...
 
 getFolderValues ()
 Get current values for folder from. More...
 
 saveFolder ()
 Save folder form. More...
 
 updateFolder ()
 Update folder. More...
 
 initFolderForm ($a_mode="edit")
 Init folder form. More...
 
 cancelFolderUpdate ()
 Cancel save. More...
 
 cancelSave ()
 Cancel save. More...
 
 createMediaPoolPage ()
 Create new content snippet. More...
 
 editMediaPoolPage ()
 Edit media pool page. More...
 
 saveMediaPoolPage ()
 Save media pool page. More...
 
 updateMediaPoolPage ()
 Update media pool page. More...
 
 initMediaPoolPageForm ($a_mode="edit")
 Init page form. More...
 
 getMediaPoolPageValues ()
 Get current values for media pool page from. More...
 
 setMediaPoolPageTabs ()
 Set media pool page tabs. More...
 
 showAllMediaPoolPageUsages ()
 List usages of the contnet snippet. More...
 
 showMediaPoolPageUsages ($a_all=false)
 List usages of the contnet snippet. More...
 
 setContentSubTabs ($a_active)
 Set sub tabs for content tab. More...
 
 setTabs ()
 Set tabs. More...
 
 setSettingsSubTabs ($a_active)
 Set setting sub tabs. More...
 
 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 More...
 
 infoScreen ()
 show information screen More...
 
 selectUploadDirFiles ($a_files=null)
 Select files from upload directory. More...
 
 createMediaFromUploadDir ()
 Create media object from upload directory. More...
 
 export ()
 export content object More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 
 getCreationMode ()
 
 prepareOutput ($a_show_subobjects=true)
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 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 More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static _goto ($a_target)
 goto target media pool More...
 
static getPreviewModalHTML ($a_mpool_ref_id, $a_tpl)
 Get preview modal html. More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

 $output_prepared
 
- Data Fields inherited from ilObject2GUI
 $tree
 
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $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
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 afterConstructor ()
 Initialisation. More...
 
 initCreationForms ($a_new_type)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $a_form)
 
 showMedia ()
 show media object More...
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 
 showActions ()
 
 getTabs ()
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __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 More...
 
 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 More...
 
 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. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $tabs
 
 $error
 
 $help
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjMediaPoolGUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

Constructor.

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

References $DIC.

46  {
47  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
48  global $DIC;
49 
50  $this->tabs = $DIC->tabs();
51  $this->error = $DIC["ilErr"];
52  $this->locator = $DIC["ilLocator"];
53  $this->help = $DIC["ilHelp"];
54  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ _goto()

static ilObjMediaPoolGUI::_goto (   $a_target)
static

goto target media pool

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

References $_GET, $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), array, exit, and ilUtil\sendFailure().

1587  {
1588  global $DIC;
1589 
1590  $ilAccess = $DIC->access();
1591  $ilErr = $DIC["ilErr"];
1592  $lng = $DIC->language();
1593 
1594  $targets = explode('_', $a_target);
1595  if (count((array) $targets) > 1) {
1596  $ref_id = $targets[0];
1597  $subitem_id = $targets[1];
1598  } else {
1599  $ref_id = $targets[0];
1600  }
1601 
1602  if ($ilAccess->checkAccess("read", "", $ref_id)) {
1603  $_GET["baseClass"] = "ilMediaPoolPresentationGUI";
1604  $_GET["ref_id"] = $ref_id;
1605  $_GET['mepitem_id'] = $subitem_id;
1606  include("ilias.php");
1607  exit;
1608  } elseif ($ilAccess->checkAccess("visible", "", $ref_id)) {
1609  $_GET["baseClass"] = "ilMediaPoolPresentationGUI";
1610  $_GET["ref_id"] = $ref_id;
1611  $_GET["cmd"] = "infoScreen";
1612  include("ilias.php");
1613  exit;
1614  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1615  ilUtil::sendFailure(sprintf(
1616  $lng->txt("msg_no_perm_read_item"),
1618  ), true);
1620  }
1621 
1622  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1623  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjMediaPoolGUI::addLocatorItems ( )

add locator items for media pool

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

References $_GET, ilObjectGUI\$access, ilObjectGUI\$locator, ilObjectGUI\$obj_id, $path, $title, ilObject2GUI\$tree, and ilObject2GUI\getCreationMode().

999  {
1000  $ilLocator = $this->locator;
1001  $ilAccess = $this->access;
1002 
1003  if (!$this->getCreationMode() && $this->ctrl->getCmd() != "explorer") {
1004  $tree = $this->object->getTree();
1005  $obj_id = ($_GET["mepitem_id"] == "")
1006  ? $tree->getRootId()
1007  : $_GET["mepitem_id"];
1008  $path = $tree->getPathFull($obj_id);
1009  foreach ($path as $node) {
1010  if ($node["child"] == $tree->getRootId()) {
1011  $this->ctrl->setParameter($this, "mepitem_id", "");
1012  if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
1013  $link = $this->ctrl->getLinkTarget($this, "listMedia");
1014  } elseif ($ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
1015  $link = $this->ctrl->getLinkTarget($this, "infoScreen");
1016  }
1017  $title = $this->object->getTitle();
1018  $this->ctrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
1019  $ilLocator->addItem($title, $link, "", $_GET["ref_id"]);
1020  }
1021  }
1022  }
1023  }
$_GET["client_id"]
+ Here is the call graph for this function:

◆ afterConstructor()

ilObjMediaPoolGUI::afterConstructor ( )
protected

Initialisation.

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

References ilObjectGUI\$lng, and array.

62  {
63  $lng = $this->lng;
64 
65  $lng->loadLanguageModule("mep");
66 
67  if ($this->ctrl->getCmd() == "explorer") {
68  $this->ctrl->saveParameter($this, array("ref_id"));
69  } else {
70  $this->ctrl->saveParameter($this, array("ref_id", "mepitem_id"));
71  }
72  $this->ctrl->saveParameter($this, array("mep_mode"));
73 
74  $lng->loadLanguageModule("content");
75  }
Create styles array
The data for the language used.

◆ afterSave()

ilObjMediaPoolGUI::afterSave ( ilObject  $newObj)

save object

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

References ilObject\getRefId(), ilUtil\redirect(), and ilUtil\sendSuccess().

408  {
409  // always send a message
410  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
411 
412  //ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
413  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=" . $newObj->getRefId() . "&cmd=listMedia");
414  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getRefId()
get reference id public
static redirect($a_script)
+ Here is the call graph for this function:

◆ allMedia()

ilObjMediaPoolGUI::allMedia ( )

list all objects

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

References $_GET, $_POST, ilObjectGUI\$ctrl, $ilCtrl, $ilUser, $tabs, ilObjectGUI\$tpl, ilObjectGUI\$user, ilObject2GUI\checkPermission(), ilMediaPoolTableGUI\IL_MEP_EDIT, ilMediaPoolItem\lookupTitle(), and setContentSubTabs().

Referenced by applyFilter(), and resetFilter().

529  {
530  $tpl = $this->tpl;
531  $ilTabs = $this->tabs;
534 
535  $ilCtrl->setParameter($this, "mep_mode", "allMedia");
536 
537  $this->checkPermission("read");
538  $ilTabs->setTabActive("content");
539  $this->setContentSubTabs("mep_all_mobs");
540 
541 
542  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
543  $mep_table_gui = new ilMediaPoolTableGUI(
544  $this,
545  "allMedia",
546  $this->object,
547  "mepitem_id",
549  true
550  );
551 
552 
553  if (isset($_GET['force_filter']) and $_GET['force_filter']) {
554  $_POST['title'] = ilMediaPoolItem::lookupTitle((int) $_GET['force_filter']);
555 
556  include_once("./Services/Table/classes/class.ilTablePropertiesStorage.php");
557  $tprop = new ilTablePropertiesStorage();
558  $tprop->storeProperty(
559  $mep_table_gui->getId(),
560  $ilUser->getId(),
561  'filter',
562  1
563  );
564  $mep_table_gui->resetFilter();
565  $mep_table_gui->resetOffset();
566  $mep_table_gui->writeFilterToSession();
567 
568  // Read again
569  $mep_table_gui = new ilMediaPoolTableGUI(
570  $this,
571  "allMedia",
572  $this->object,
573  "mepitem_id",
575  true
576  );
577  }
578 
579  $tpl->setContent($mep_table_gui->getHTML());
580  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
Saves (mostly asynchronously) user properties of tables (e.g.
global $ilCtrl
Definition: ilias.php:18
setContentSubTabs($a_active)
Set sub tabs for content tab.
$ilUser
Definition: imgupload.php:18
static lookupTitle($a_id)
Lookup title.
$_POST["username"]
TableGUI class for recent changes in wiki.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyFilter()

ilObjMediaPoolGUI::applyFilter ( )

Apply filter.

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

References allMedia(), and ilMediaPoolTableGUI\IL_MEP_EDIT.

586  {
587  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
588  $mtab = new ilMediaPoolTableGUI(
589  $this,
590  "allMedia",
591  $this->object,
592  "mepitem_id",
594  true
595  );
596  $mtab->writeFilterToSession();
597  $mtab->resetOffset();
598  $this->allMedia();
599  }
allMedia()
list all objects
TableGUI class for recent changes in wiki.
+ Here is the call graph for this function:

◆ cancelFolderUpdate()

ilObjMediaPoolGUI::cancelFolderUpdate ( )

Cancel save.

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

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, and object.

1161  {
1162  $ilCtrl = $this->ctrl;
1163  $ilCtrl->setParameter(
1164  $this,
1165  "mepitem_id",
1166  $this->object->getTree()->getParentId($_GET["mepitem_id"])
1167  );
1168  $ilCtrl->redirect($this, "listMedia");
1169  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Create new PHPExcel object
obj_idprivate

◆ cancelRemove()

ilObjMediaPoolGUI::cancelRemove ( )

cancel deletion of media objects/folders

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

References $_GET.

937  {
938  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
939  }
$_GET["client_id"]

◆ cancelSave()

ilObjMediaPoolGUI::cancelSave ( )

Cancel save.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

1175  {
1176  $ilCtrl = $this->ctrl;
1177  $ilCtrl->redirect($this, "listMedia");
1178  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmRemove()

ilObjMediaPoolGUI::confirmRemove ( )

confirm remove of mobs

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

References $_POST, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$obj_id, $title, $type, ilObject2GUI\checkPermission(), ilUtil\getImageTagByType(), ilPageContentUsage\getUsages(), ilMediaPoolItem\lookupTitle(), ilMediaPoolItem\lookupType(), and ilUtil\sendFailure().

787  {
789  $lng = $this->lng;
791 
792  $this->checkPermission("write");
793 
794  if (!isset($_POST["id"])) {
795  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
796  }
797 
798  // display confirmation message
799  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
800  $cgui = new ilConfirmationGUI();
801  $cgui->setFormAction($this->ctrl->getFormAction($this));
802  $cgui->setHeaderText($this->lng->txt("info_remove_sure"));
803  $cgui->setCancel($this->lng->txt("cancel"), "cancelRemove");
804  $cgui->setConfirm($this->lng->txt("confirm"), "remove");
805 
806  foreach ($_POST["id"] as $obj_id) {
809 
810  // check whether page can be removed
811  $add = "";
812  if ($type == "pg") {
813  include_once("./Services/COPage/classes/class.ilPageContentUsage.php");
814  $usages = ilPageContentUsage::getUsages("incl", $obj_id, false);
815  if (count($usages) > 0) {
816  ilUtil::sendFailure(sprintf($lng->txt("mep_content_snippet_in_use"), $title), true);
817  $ilCtrl->redirect($this, "listMedia");
818  } else {
819  // check whether the snippet is used in older versions of pages
820  $usages = ilPageContentUsage::getUsages("incl", $obj_id, true);
821  if (count($usages) > 0) {
822  $add = "<div class='small'>" . $lng->txt("mep_content_snippet_used_in_older_versions") . "</div>";
823  }
824  }
825  }
826 
827  $caption = ilUtil::getImageTagByType($type, $this->tpl->tplPath) .
828  " " . $title . $add;
829 
830  $cgui->addItem("id[]", $obj_id, $caption);
831  }
832 
833  $this->tpl->setContent($cgui->getHTML());
834  }
static lookupType($a_id)
Lookup type.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$type
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
global $ilCtrl
Definition: ilias.php:18
static getUsages($a_pc_type, $a_pc_id, $a_incl_hist=true)
Get usages.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static lookupTitle($a_id)
Lookup title.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ copyToClipboard()

ilObjMediaPoolGUI::copyToClipboard ( )

copy media objects to clipboard

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

References $_GET, $_POST, ilObjectGUI\$access, $ilUser, ilObjectGUI\$obj_id, $type, ilObjectGUI\$user, ilObject2GUI\checkPermission(), ilMediaPoolItem\lookupForeignId(), ilMediaPoolItem\lookupType(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

963  {
965  $ilAccess = $this->access;
966 
967  $this->checkPermission("write");
968 
969  if (!isset($_POST["id"])) {
970  ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
971  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
972  }
973 
974  foreach ($_POST["id"] as $obj_id) {
976  if ($type == "fold") {
977  ilUtil::sendFailure($this->lng->txt("cont_cant_copy_folders"), true);
978  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
979  }
980  }
981  foreach ($_POST["id"] as $obj_id) {
982  $fid = ilMediaPoolItem::lookupForeignId($obj_id);
984  if ($type == "mob") {
985  $ilUser->addObjectToClipboard($fid, "mob", "");
986  }
987  if ($type == "pg") {
988  $ilUser->addObjectToClipboard($obj_id, "incl", "");
989  }
990  }
991  ilUtil::sendSuccess($this->lng->txt("copied_to_clipboard"), true);
992  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
993  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static lookupType($a_id)
Lookup type.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$type
$_GET["client_id"]
static lookupForeignId($a_id)
Lookup Foreign Id.
$ilUser
Definition: imgupload.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ createFolderForm()

ilObjMediaPoolGUI::createFolderForm ( )

create folder form

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

References ilObjectGUI\$access, ilObjectGUI\$tpl, ilObject2GUI\checkPermission(), and initFolderForm().

1033  {
1034  $ilAccess = $this->access;
1035  $tpl = $this->tpl;
1036 
1037  $this->checkPermission("write");
1038 
1039  $this->initFolderForm("create");
1040  $tpl->setContent($this->form->getHTML());
1041  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
initFolderForm($a_mode="edit")
Init folder form.
+ Here is the call graph for this function:

◆ createMediaFromUploadDir()

ilObjMediaPoolGUI::createMediaFromUploadDir ( )

Create media object from upload directory.

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

References $_GET, $_POST, $file, $format, $location, ilObject2GUI\$tree, ilMainMenuGUI\_checkAdministrationPermission(), ilObjMediaObject\_determineWidthHeight(), ilObjMediaObject\_getDirectory(), ilObject2GUI\checkPermission(), ilObjMediaObject\getMimeType(), ilUtil\redirect(), ilUtil\renameExecutables(), ilUtil\sendFailure(), and ilUtil\virusHandling().

1727  {
1728  $this->checkPermission("write");
1729 
1730  $mset = new ilSetting("mobs");
1731  $upload_dir = trim($mset->get("upload_dir"));
1732 
1733  include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1734 
1735  if (is_array($_POST["file"]) && ilMainMenuGUI::_checkAdministrationPermission()) {
1736  foreach ($_POST["file"] as $f) {
1737  $f = str_replace("..", "", $f);
1738  $fullpath = $upload_dir . "/" . $f;
1739  $mob = new ilObjMediaObject();
1740  $mob->setTitle(basename($fullpath));
1741  $mob->setDescription("");
1742  $mob->create();
1743 
1744  // determine and create mob directory, move uploaded file to directory
1745  //$mob_dir = ilUtil::getWebspaceDir()."/mobs/mm_".$a_mob->getId();
1746  $mob->createDirectory();
1747  $mob_dir = ilObjMediaObject::_getDirectory($mob->getId());
1748 
1749  $media_item = new ilMediaItem();
1750  $mob->addMediaItem($media_item);
1751  $media_item->setPurpose("Standard");
1752 
1753  $file = $mob_dir . "/" . basename($fullpath);
1754 
1755  // virus handling
1756  $vir = ilUtil::virusHandling($fullpath, basename($fullpath));
1757  if (!$vir[0]) {
1758  ilUtil::sendFailure($this->lng->txt("file_is_infected") . "<br />" . $vir[1], true);
1759  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=" .
1760  $_GET["ref_id"] . "&mepitem_id=" . $_GET["mepitem_id"]);
1761  }
1762 
1763  switch ($_POST["action"]) {
1764  case "rename":
1765  rename($fullpath, $file);
1766  break;
1767 
1768  case "copy":
1769  copy($fullpath, $file);
1770  break;
1771  }
1772 
1773  // get mime type
1775  $location = basename($fullpath);
1776 
1777  // set real meta and object data
1778  $media_item->setFormat($format);
1779  $media_item->setLocation($location);
1780  $media_item->setLocationType("LocalFile");
1781 
1782  $mob->setDescription($format);
1783 
1784  // determine width and height of known image types
1786  $format,
1787  "File",
1788  $mob_dir . "/" . $location,
1789  $media_item->getLocation(),
1790  true,
1791  true,
1792  "",
1793  ""
1794  );
1795  $media_item->setWidth($wh["width"]);
1796  $media_item->setHeight($wh["height"]);
1797  if ($wh["info"] != "") {
1798  // ilUtil::sendInfo($wh["info"], true);
1799  }
1800 
1801  $media_item->setHAlign("Left");
1802  ilUtil::renameExecutables($mob_dir);
1803  $mob->update();
1804 
1805 
1806  // put it into current folder
1807  $mep_item = new ilMediaPoolItem();
1808  $mep_item->setTitle($mob->getTitle());
1809  $mep_item->setType("mob");
1810  $mep_item->setForeignId($mob->getId());
1811  $mep_item->create();
1812 
1813  $tree = $this->object->getTree();
1814  $parent = ($_GET["mepitem_id"] == "")
1815  ? $tree->getRootId()
1816  : $_GET["mepitem_id"];
1817  $tree->insertNode($mep_item->getId(), $parent);
1818  }
1819  }
1820  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=" .
1821  $_GET["ref_id"] . "&mepitem_id=" . $_GET["mepitem_id"]);
1822  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
static getMimeType($a_file, $a_external=null)
get mime type for file
$format
Definition: metadata.php:141
static virusHandling($a_file, $a_orig_name="", $a_clean=true)
scan file for viruses and clean files if possible
$_GET["client_id"]
$location
Definition: buildRTE.php:44
static _getDirectory($a_mob_id)
get directory for files of media object (static)
Class ilMediaItem.
Class ilObjMediaObject.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Media Pool Item.
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
static _checkAdministrationPermission()
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static _determineWidthHeight( $a_format, $a_type, $a_file, $a_reference, $a_constrain_proportions, $a_use_original, $a_user_width, $a_user_height)
Determine width and height.
static redirect($a_script)
$_POST["username"]
+ Here is the call graph for this function:

◆ createMediaObject()

ilObjMediaPoolGUI::createMediaObject ( )

obsolete?

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

392  {
393  $this->ctrl->redirectByClass("ilobjmediaobjectgui", "create");
394  }

◆ createMediaPoolPage()

ilObjMediaPoolGUI::createMediaPoolPage ( )

Create new content snippet.

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

References ilObjectGUI\$tpl, ilObject2GUI\checkPermission(), and initMediaPoolPageForm().

1188  {
1189  $tpl = $this->tpl;
1190 
1191  $this->checkPermission("write");
1192 
1193  $this->initMediaPoolPageForm("create");
1194  $tpl->setContent($this->form->getHTML());
1195  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
initMediaPoolPageForm($a_mode="edit")
Init page form.
+ Here is the call graph for this function:

◆ edit()

ilObjMediaPoolGUI::edit ( )

Edit.

Parameters

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

References setSettingsSubTabs().

443  {
444  $this->setSettingsSubTabs("settings");
445  parent::edit();
446  }
setSettingsSubTabs($a_active)
Set setting sub tabs.
+ Here is the call graph for this function:

◆ editFolder()

ilObjMediaPoolGUI::editFolder ( )

Edit folder.

Parameters

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

References ilObjectGUI\$tpl, ilObject2GUI\checkPermission(), getFolderValues(), and initFolderForm().

1050  {
1051  $tpl = $this->tpl;
1052 
1053  $this->checkPermission("write");
1054 
1055  $this->initFolderForm();
1056  $this->getFolderValues();
1057  $tpl->setContent($this->form->getHTML());
1058  }
getFolderValues()
Get current values for folder from.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
initFolderForm($a_mode="edit")
Init folder form.
+ Here is the call graph for this function:

◆ editMediaPoolPage()

ilObjMediaPoolGUI::editMediaPoolPage ( )

Edit media pool page.

Parameters

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

References $_GET, $tabs, ilObjectGUI\$tpl, ilObject2GUI\checkPermission(), getMediaPoolPageValues(), initMediaPoolPageForm(), and setMediaPoolPageTabs().

1204  {
1205  $tpl = $this->tpl;
1206  $ilTabs = $this->tabs;
1207 
1208  $this->checkPermission("write");
1209 
1210  $ilTabs->clearTargets();
1211 
1212  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1213  $mep_page_gui = new ilMediaPoolPageGUI($_GET["mepitem_id"], $_GET["old_nr"]);
1214  $mep_page_gui->getTabs();
1215 
1216  $this->setMediaPoolPageTabs();
1217 
1218  $this->initMediaPoolPageForm("edit");
1219  $this->getMediaPoolPageValues();
1220  $tpl->setContent($this->form->getHTML());
1221  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
initMediaPoolPageForm($a_mode="edit")
Init page form.
setMediaPoolPageTabs()
Set media pool page tabs.
getMediaPoolPageValues()
Get current values for media pool page from.
Class ilMediaPoolPage GUI class.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjMediaPoolGUI::executeCommand ( )

execute command

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

References $_GET, $_POST, ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $ret, $tabs, ilObjectGUI\$tpl, ilObject2GUI\$tree, ilObjectGUI\addHeaderAction(), ilObject2GUI\checkPermission(), ilObject2GUI\getCreationMode(), ilObjectTranslation\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getParentFolderId(), getTemplate(), infoScreen(), ilMediaPoolItem\lookupForeignId(), object, ilObject2GUI\prepareOutput(), ilUtil\redirect(), setContentSubTabs(), ilObject2GUI\setCreationMode(), ilObject2GUI\setLocator(), setMediaPoolPageTabs(), ilFileSystemGUI\setPostDirPath(), and setSettingsSubTabs().

89  {
90  $ilTabs = $this->tabs;
91  $lng = $this->lng;
92  $ilAccess = $this->access;
93  $tpl = $this->tpl;
95 
96  if ($this->ctrl->getRedirectSource() == "ilinternallinkgui") {
97  $this->explorer();
98  return;
99  }
100 
101  $next_class = $this->ctrl->getNextClass($this);
102  $cmd = $this->ctrl->getCmd();
103  $new_type = $_POST["new_type"]
104  ? $_POST["new_type"]
105  : $_GET["new_type"];
106 
107  if ($new_type != "" && ($cmd != "confirmRemove" && $cmd != "copyToClipboard"
108  && $cmd != "pasteFromClipboard")) {
109  $this->setCreationMode(true);
110  }
111 
112  if (!$this->getCreationMode()) {
113  $tree = $this->object->getTree();
114  if ($_GET["mepitem_id"] == "") {
115  $_GET["mepitem_id"] = $tree->getRootId();
116  }
117  }
118  if ($cmd == "create") {
119  switch ($_POST["new_type"]) {
120  case "mob":
121  $this->ctrl->redirectByClass("ilobjmediaobjectgui", "create");
122  break;
123 
124  case "fold":
125  $this->ctrl->redirectByClass("ilobjfoldergui", "create");
126  break;
127  }
128  }
129 
130  switch ($next_class) {
131  case 'ilmediapoolpagegui':
132  $this->checkPermission("write");
133  $this->prepareOutput();
134  $this->addHeaderAction();
135  $ilTabs->clearTargets();
136  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
137  $mep_page_gui = new ilMediaPoolPageGUI($_GET["mepitem_id"], $_GET["old_nr"]);
138 
139  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
140  $mep_page_gui->setEnableEditing(false);
141  }
142  $ret = $this->ctrl->forwardCommand($mep_page_gui);
143  if ($ret != "") {
144  $tpl->setContent($ret);
145  }
146  $this->setMediaPoolPageTabs();
147  $this->tpl->show();
148  break;
149 
150  case "ilobjmediaobjectgui":
151  $this->checkPermission("write");
152  //$cmd.="Object";
153  if ($cmd == "create" || $cmd == "save" || $cmd == "cancel") {
154  $ret_obj = $_GET["mepitem_id"];
155  $ilObjMediaObjectGUI = new ilObjMediaObjectGUI("", 0, false, false);
156  $ilObjMediaObjectGUI->setWidthPreset($this->object->getDefaultWidth());
157  $ilObjMediaObjectGUI->setHeightPreset($this->object->getDefaultHeight());
158  } else {
159  $ret_obj = $tree->getParentId($_GET["mepitem_id"]);
160  $ilObjMediaObjectGUI = new ilObjMediaObjectGUI("", ilMediaPoolItem::lookupForeignId($_GET["mepitem_id"]), false, false);
161  $this->ctrl->setParameter($this, "mepitem_id", $this->getParentFolderId());
162  $ilTabs->setBackTarget(
163  $lng->txt("back"),
164  $this->ctrl->getLinkTarget(
165  $this,
166  $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia"
167  )
168  );
169  }
170  if ($this->ctrl->getCmdClass() == "ilinternallinkgui") {
171  $this->ctrl->setReturn($this, "explorer");
172  } else {
173  $this->ctrl->setParameter($this, "mepitem_id", $ret_obj);
174  $this->ctrl->setReturn(
175  $this,
176  $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia"
177  );
178  $this->ctrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
179  }
180  $this->getTemplate();
181  $ilObjMediaObjectGUI->setTabs();
182  $this->setLocator();
183 
184  $ret = $this->ctrl->forwardCommand($ilObjMediaObjectGUI);
185 
186  if ($cmd == "save" && $ret != false) {
187  $mep_item = new ilMediaPoolItem();
188  $mep_item->setTitle($ret->getTitle());
189  $mep_item->setType("mob");
190  $mep_item->setForeignId($ret->getId());
191  $mep_item->create();
192 
193  $parent = ($_GET["mepitem_id"] == "")
194  ? $tree->getRootId()
195  : $_GET["mepitem_id"];
196  $tree->insertNode($mep_item->getId(), $parent);
197  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=" .
198  $_GET["ref_id"] . "&mepitem_id=" . $_GET["mepitem_id"]);
199  } else {
200  $this->tpl->show();
201  }
202  break;
203 
204  case "ilobjfoldergui":
205  $this->checkPermission("write");
206  $this->addHeaderAction();
207  $folder_gui = new ilObjFolderGUI("", 0, false, false);
208  $this->ctrl->setReturn($this, "listMedia");
209  $cmd.="Object";
210  switch ($cmd) {
211  case "createObject":
212  $this->prepareOutput();
213  $folder_gui = new ilObjFolderGUI("", 0, false, false);
214  $folder_gui->setFormAction(
215  "save",
216  $this->ctrl->getFormActionByClass("ilobjfoldergui")
217  );
218  $folder_gui->createObject();
219  $this->tpl->show();
220  break;
221 
222  case "saveObject":
223  //$folder_gui->setReturnLocation("save", $this->ctrl->getLinkTarget($this, "listMedia"));
224  $parent = ($_GET["mepitem_id"] == "")
225  ? $tree->getRootId()
226  : $_GET["mepitem_id"];
227  $folder_gui->setFolderTree($tree);
228  $folder_gui->saveObject($parent);
229  //$this->ctrl->redirect($this, "listMedia");
230  break;
231 
232  case "editObject":
233  $this->prepareOutput();
234  $folder_gui = new ilObjFolderGUI("", ilMediaPoolItem::lookupForeignId($_GET["mepitem_id"]), false, false);
235  $this->ctrl->setParameter($this, "foldereditmode", "1");
236  $folder_gui->setFormAction("update", $this->ctrl->getFormActionByClass("ilobjfoldergui"));
237  $folder_gui->editObject();
238  $this->tpl->show();
239  break;
240 
241  case "updateObject":
242  $folder_gui = new ilObjFolderGUI("", ilMediaPoolItem::lookupForeignId($_GET["mepitem_id"]), false, false);
243  $this->ctrl->setParameter($this, "mepitem_id", $this->getParentFolderId());
244  $this->ctrl->setReturn($this, "listMedia");
245  $folder_gui->updateObject(true); // this returns to parent
246  break;
247 
248  case "cancelObject":
249  if ($_GET["foldereditmode"]) {
250  $this->ctrl->setParameter($this, "mepitem_id", $this->getParentFolderId());
251  }
252  $this->ctrl->redirect($this, "listMedia");
253  break;
254  }
255  break;
256 
257  case "ileditclipboardgui":
258  $this->prepareOutput();
259  $this->addHeaderAction();
260  $this->ctrl->setReturn($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
261  $clip_gui = new ilEditClipboardGUI();
262  $clip_gui->setMultipleSelections(true);
263  $clip_gui->setInsertButtonTitle($lng->txt("mep_copy_to_mep"));
264  $ilTabs->setTabActive("clipboard");
265  $this->ctrl->forwardCommand($clip_gui);
266  $this->tpl->show();
267  break;
268 
269  case 'ilinfoscreengui':
270  $this->prepareOutput();
271  $this->addHeaderAction();
272  $this->infoScreen();
273  $this->tpl->show();
274  break;
275 
276  case 'ilpermissiongui':
277  $this->checkPermission("edit_permission");
278  $this->prepareOutput();
279  $this->addHeaderAction();
280  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
281  $perm_gui = new ilPermissionGUI($this);
282  $this->ctrl->forwardCommand($perm_gui);
283  $this->tpl->show();
284  break;
285 
286  case "ilexportgui":
287  $this->checkPermission("write");
288  $this->prepareOutput();
289  $this->addHeaderAction();
290  include_once("./Services/Export/classes/class.ilExportGUI.php");
291  $exp_gui = new ilExportGUI($this);
292  $exp_gui->addFormat("xml");
293  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
294  $ot = ilObjectTranslation::getInstance($this->object->getId());
295  if ($ot->getContentActivated()) {
296  $exp_gui->addFormat("xml_master", "XML (" . $lng->txt("mep_master_language_only") . ")", $this, "export");
297  $exp_gui->addFormat("xml_masternomedia", "XML (" . $lng->txt("mep_master_language_only_no_media") . ")", $this, "export");
298  }
299  $this->ctrl->forwardCommand($exp_gui);
300  $this->tpl->show();
301  break;
302 
303  case "ilfilesystemgui":
304  $this->checkPermission("write");
305  $this->prepareOutput();
306  $this->addHeaderAction();
307  $ilTabs->clearTargets();
308  $ilTabs->setBackTarget(
309  $lng->txt("back"),
310  $ilCtrl->getLinkTarget($this, "listMedia")
311  );
312  $mset = new ilSetting("mobs");
313  if (trim($mset->get("upload_dir")) != "") {
314  include_once("./Services/FileSystem/classes/class.ilFileSystemGUI.php");
315  $fs_gui = new ilFileSystemGUI($mset->get("upload_dir"));
316  $fs_gui->setPostDirPath(true);
317  $fs_gui->setTableId("mepud" . $this->object->getId());
318  $fs_gui->setAllowFileCreation(false);
319  $fs_gui->setAllowDirectoryCreation(false);
320  $fs_gui->clearCommands();
321  $fs_gui->addCommand(
322  $this,
323  "selectUploadDirFiles",
324  $this->lng->txt("mep_sel_upload_dir_files"),
325  false,
326  true
327  );
328  $this->ctrl->forwardCommand($fs_gui);
329  }
330  $this->tpl->show();
331  break;
332 
333  case "ilcommonactiondispatchergui":
334  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
336  $this->ctrl->forwardCommand($gui);
337  break;
338 
339  case 'ilobjecttranslationgui':
340  $this->prepareOutput();
341  $this->addHeaderAction();
342  //$this->setTabs("settings");
343  $ilTabs->activateTab("settings");
344  $this->setSettingsSubTabs("obj_multilinguality");
345  include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
346  $transgui = new ilObjectTranslationGUI($this);
347  $transgui->setTitleDescrOnlyMode(false);
348  $this->ctrl->forwardCommand($transgui);
349  $this->tpl->show();
350  break;
351 
352  case "ilmediapoolimportgui":
353  $this->prepareOutput();
354  $this->addHeaderAction();
355  $ilTabs->activateTab("import");
356  include_once("./Modules/MediaPool/classes/class.ilMediaPoolImportGUI.php");
357  $gui = new ilMediaPoolImportGUI($this->object);
358  $this->ctrl->forwardCommand($gui);
359  $this->tpl->show();
360  break;
361 
362  case "ilmobmultisrtuploadgui":
363  $this->checkPermission("write");
364  $this->prepareOutput();
365  $this->addHeaderAction();
366  //$this->setTabs("content");
367  $this->setContentSubTabs("srt_files");
368  include_once("./Services/MediaObjects/classes/class.ilMobMultiSrtUploadGUI.php");
369  include_once("./Modules/MediaPool/classes/class.ilMepMultiSrt.php");
370  $gui = new ilMobMultiSrtUploadGUI(new ilMepMultiSrt($this->object));
371  $this->ctrl->forwardCommand($gui);
372  $this->tpl->show();
373  break;
374 
375 
376  default:
377  $this->prepareOutput();
378  $this->addHeaderAction();
379  $cmd = $this->ctrl->getCmd("listMedia");
380  $this->$cmd();
381  if (!$this->getCreationMode()) {
382  $this->tpl->show();
383  }
384  break;
385  }
386  }
setLocator()
set Locator
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Class ilObjFolderGUI.
Class ilEditClipboardGUI.
setSettingsSubTabs($a_active)
Set setting sub tabs.
setPostDirPath($a_val)
Set post dir path.
$_GET["client_id"]
infoScreen()
show information screen
getTemplate()
Get standard template.
setMediaPoolPageTabs()
Set media pool page tabs.
global $ilCtrl
Definition: ilias.php:18
Handler class for multi srt upload in learning modules.
setCreationMode($a_mode=true)
static lookupForeignId($a_id)
Lookup Foreign Id.
Export User Interface Class.
setContentSubTabs($a_active)
Set sub tabs for content tab.
Upload SRT files to a set of media objects.
Import related features for media pools (currently used for translation imports)
Media Pool Item.
Class ilObjMediaObjectGUI.
getParentFolderId()
Get folder parent ID.
Create new PHPExcel object
obj_idprivate
static getInstance($a_obj_id)
Get instance.
$ret
Definition: parser.php:6
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
File System Explorer GUI class.
static redirect($a_script)
addHeaderAction()
Add header action menu.
$_POST["username"]
Class ilMediaPoolPage GUI class.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
+ Here is the call graph for this function:

◆ export()

ilObjMediaPoolGUI::export ( )

export content object

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

References $_POST, $format, ilObjectTranslation\getInstance(), object, and ilUtil\stripSlashes().

1860  {
1861  $ot = ilObjectTranslation::getInstance($this->object->getId());
1862  $opt = "";
1863  if ($ot->getContentActivated()) {
1864  $format = explode("_", $_POST["format"]);
1865  $opt = ilUtil::stripSlashes($format[1]);
1866  }
1867 
1868  $this->object->exportXML($opt);
1869  }
$format
Definition: metadata.php:141
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create new PHPExcel object
obj_idprivate
static getInstance($a_obj_id)
Get instance.
$_POST["username"]
+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjMediaPoolGUI::getEditFormCustomValues ( array $a_values)
protected

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

References object.

450  {
451  if ($this->object->getDefaultWidth() > 0) {
452  $a_values["default_width"] = $this->object->getDefaultWidth();
453  }
454  if ($this->object->getDefaultHeight() > 0) {
455  $a_values["default_height"] = $this->object->getDefaultHeight();
456  }
457  }
Create new PHPExcel object
obj_idprivate

◆ getFolderValues()

ilObjMediaPoolGUI::getFolderValues ( )

Get current values for folder from.

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

References $_GET, array, and ilMediaPoolItem\lookupTitle().

Referenced by editFolder().

1064  {
1065  $values = array();
1066 
1067  $values["title"] = ilMediaPoolItem::lookupTitle($_GET["mepitem_id"]);
1068 
1069  $this->form->setValuesByArray($values);
1070  }
$_GET["client_id"]
Create styles array
The data for the language used.
static lookupTitle($a_id)
Lookup title.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMediaPoolPageValues()

ilObjMediaPoolGUI::getMediaPoolPageValues ( )

Get current values for media pool page from.

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

References $_GET, array, and ilMediaPoolItem\lookupTitle().

Referenced by editMediaPoolPage().

1327  {
1328  $values = array();
1329 
1330  include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1331  $values["title"] = ilMediaPoolItem::lookupTitle($_GET["mepitem_id"]);
1332 
1333  $this->form->setValuesByArray($values);
1334  }
$_GET["client_id"]
Create styles array
The data for the language used.
static lookupTitle($a_id)
Lookup title.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getParentFolderId()

ilObjMediaPoolGUI::getParentFolderId ( )

Get folder parent ID.

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

References $_GET, and object.

Referenced by executeCommand().

633  {
634  if ($_GET["mepitem_id"] == "") {
635  return "";
636  }
637  $par_id = $this->object->getPoolTree()->getParentId($_GET["mepitem_id"]);
638  if ($par_id != $this->object->getPoolTree()->getRootId()) {
639  return $par_id;
640  } else {
641  return "";
642  }
643  }
$_GET["client_id"]
Create new PHPExcel object
obj_idprivate
+ Here is the caller graph for this function:

◆ getPreviewModalHTML()

static ilObjMediaPoolGUI::getPreviewModalHTML (   $a_mpool_ref_id,
  $a_tpl 
)
static

Get preview modal html.

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

References $_GET, $DIC, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, array, ilModalGUI\getInstance(), ilObjMediaObjectGUI\includePresentationJS(), and ilModalGUI\TYPE_LARGE.

Referenced by ilMediaPoolTableGUI\getHTML().

1828  {
1829  global $DIC;
1830 
1831  $tpl = $DIC["tpl"];
1832  $ilCtrl = $DIC->ctrl();
1833  $lng = $DIC->language();
1834 
1835  require_once("./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1837 
1838  $tpl->addJavaScript("./Modules/MediaPool/js/ilMediaPool.js");
1839 
1840  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", "");
1841  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "ref_id", $a_mpool_ref_id);
1842  $tpl->addOnloadCode("il.MediaPool.setPreviewUrl('" . $ilCtrl->getLinkTargetByClass(array("ilmediapoolpresentationgui", "ilobjmediapoolgui"), "showPreview", "", false, false) . "');");
1843  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", $_GET["mepitem_id"]);
1844  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "ref_id", $_GET["red_id"]);
1845 
1846  include_once("./Services/UIComponent/Modal/classes/class.ilModalGUI.php");
1847  $modal = ilModalGUI::getInstance();
1848  $modal->setHeading($lng->txt("preview"));
1849  $modal->setId("ilMepPreview");
1850  $modal->setType(ilModalGUI::TYPE_LARGE);
1851  $modal->setBody("<iframe id='ilMepPreviewContent'></iframe>");
1852 
1853  return $modal->getHTML();
1854  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static includePresentationJS($a_tpl=null)
Include media object presentation JS.
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
static getInstance()
Get instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplate()

ilObjMediaPoolGUI::getTemplate ( )

Get standard template.

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

Referenced by executeCommand().

624  {
625  $this->tpl->getStandardTemplate();
626  }
+ Here is the caller graph for this function:

◆ getType()

ilObjMediaPoolGUI::getType ( )
final

Get type.

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

81  {
82  return "mep";
83  }

◆ infoScreen()

ilObjMediaPoolGUI::infoScreen ( )

show information screen

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

References ilObjectGUI\$access, $error, ilObjectGUI\$ilErr, $info, and object.

Referenced by executeCommand(), and infoScreenObject().

1641  {
1642  $ilAccess = $this->access;
1643  $ilErr = $this->error;
1644 
1645  if (!$ilAccess->checkAccess("visible", "", $this->ref_id) &&
1646  !$ilAccess->checkAccess("read", "", $this->ref_id) &&
1647  !$ilAccess->checkAccess("write", "", $this->ref_id)) {
1648  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
1649  }
1650 
1651  if ($this->ctrl->getCmd() == "infoScreen") {
1652  $this->ctrl->setCmd("showSummary");
1653  $this->ctrl->setCmdClass("ilinfoscreengui");
1654  }
1655 
1656  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1657  $info = new ilInfoScreenGUI($this);
1658 
1659  $info->enablePrivateNotes();
1660 
1661 
1662  // standard meta data
1663  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1664 
1665  // forward the command
1666  $this->ctrl->forwardCommand($info);
1667  }
Class ilInfoScreenGUI.
Create new PHPExcel object
obj_idprivate
$info
Definition: index.php:5
+ Here is the caller graph for this function:

◆ infoScreenObject()

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 1630 of file class.ilObjMediaPoolGUI.php.

References infoScreen().

1631  {
1632  $this->ctrl->setCmd("showSummary");
1633  $this->ctrl->setCmdClass("ilinfoscreengui");
1634  $this->infoScreen();
1635  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjMediaPoolGUI::initCreationForms (   $a_new_type)
protected

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

References array, ilObjectGUI\initCreateForm(), and ilObjectGUI\initImportForm().

397  {
398  $forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type),
399  self::CFORM_IMPORT => $this->initImportForm($a_new_type));
400 
401  return $forms;
402  }
initImportForm($a_new_type)
Init object import form.
initCreateForm($a_new_type)
Init object creation form.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjMediaPoolGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

References ilPropertyFormGUI\addItem(), ilNumberInputGUI\setMinValue(), and ilNumberInputGUI\setSuffix().

417  {
418  // default width
419  $ni = new ilNumberInputGUI($this->lng->txt("mep_default_width"), "default_width");
420  $ni->setMinValue(0);
421  $ni->setSuffix("px");
422  $ni->setMaxLength(5);
423  $ni->setSize(5);
424  $a_form->addItem($ni);
425 
426  // default height
427  $ni = new ilNumberInputGUI($this->lng->txt("mep_default_height"), "default_height");
428  $ni->setSuffix("px");
429  $ni->setMinValue(0);
430  $ni->setMaxLength(5);
431  $ni->setSize(5);
432  $ni->setInfo($this->lng->txt("mep_default_width_height_info"));
433  $a_form->addItem($ni);
434  }
addItem($a_item)
Add Item (Property, SectionHeader).
setMinValue($a_minvalue, $a_display_always=false)
Set Minimum Value.
setSuffix($a_value)
Set suffix.
This class represents a number property in a property form.
+ Here is the call graph for this function:

◆ initFolderForm()

ilObjMediaPoolGUI::initFolderForm (   $a_mode = "edit")

Init folder form.

Parameters
int$a_modeEdit Mode

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

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, and ilTextInputGUI\setMaxLength().

Referenced by createFolderForm(), editFolder(), saveFolder(), and updateFolder().

1130  {
1131  $lng = $this->lng;
1132  $ilCtrl = $this->ctrl;
1133 
1134  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1135  $this->form = new ilPropertyFormGUI();
1136 
1137  // desc
1138  $ti = new ilTextInputGUI($lng->txt("title"), "title");
1139  $ti->setMaxLength(128);
1140  $ti->setRequired(true);
1141  $this->form->addItem($ti);
1142 
1143  // save and cancel commands
1144  if ($a_mode == "create") {
1145  $this->form->addCommandButton("saveFolder", $lng->txt("save"));
1146  $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
1147  $this->form->setTitle($lng->txt("mep_new_folder"));
1148  } else {
1149  $this->form->addCommandButton("updateFolder", $lng->txt("save"));
1150  $this->form->addCommandButton("cancelFolderUpdate", $lng->txt("cancel"));
1151  $this->form->setTitle($lng->txt("mep_edit_folder"));
1152  }
1153 
1154  $this->form->setFormAction($ilCtrl->getFormAction($this));
1155  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMediaPoolPageForm()

ilObjMediaPoolGUI::initMediaPoolPageForm (   $a_mode = "edit")

Init page form.

Parameters
int$a_modeEdit Mode

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

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, and ilTextInputGUI\setMaxLength().

Referenced by createMediaPoolPage(), editMediaPoolPage(), saveMediaPoolPage(), and updateMediaPoolPage().

1297  {
1298  $lng = $this->lng;
1299  $ilCtrl = $this->ctrl;
1300 
1301  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1302  $this->form = new ilPropertyFormGUI();
1303 
1304  // title
1305  $ti = new ilTextInputGUI($lng->txt("title"), "title");
1306  $ti->setMaxLength(128);
1307  $ti->setRequired(true);
1308  $this->form->addItem($ti);
1309 
1310  // save and cancel commands
1311  if ($a_mode == "create") {
1312  $this->form->addCommandButton("saveMediaPoolPage", $lng->txt("save"));
1313  $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
1314  $this->form->setTitle($lng->txt("mep_new_content_snippet"));
1315  } else {
1316  $this->form->addCommandButton("updateMediaPoolPage", $lng->txt("save"));
1317  $this->form->setTitle($lng->txt("mep_edit_content_snippet"));
1318  }
1319 
1320  $this->form->setFormAction($ilCtrl->getFormAction($this));
1321  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertFromClipboard()

ilObjMediaPoolGUI::insertFromClipboard ( )

insert media object from clipboard

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

References $_GET, ilObjectGUI\$access, $id, $type, ilEditClipboardGUI\_getSelectedIDs(), ilObject\_lookupTitle(), array, ilObject2GUI\checkPermission(), ilMediaPoolPage\lookupTitle(), ilMediaPoolItem\lookupTitle(), object, and ilUtil\sendInfo().

865  {
866  $ilAccess = $this->access;
867 
868  $this->checkPermission("write");
869 
870  include_once("./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
872  $not_inserted = array();
873  if (is_array($ids)) {
874  foreach ($ids as $id2) {
875  $id = explode(":", $id2);
876  $type = $id[0];
877  $id = $id[1];
878 
879  if ($type == "mob") { // media object
880  if (ilObjMEdiaPool::isForeignIdInTree($this->object->getId(), $id)) {
881  $not_inserted[] = ilObject::_lookupTitle($id) . " [" .
882  $id . "]";
883  } else {
884  $item = new ilMediaPoolItem();
885  $item->setType("mob");
886  $item->setForeignId($id);
887  $item->setTitle(ilObject::_lookupTitle($id));
888  $item->create();
889  if ($item->getId() > 0) {
890  $this->object->insertInTree($item->getId(), $_GET["mepitem_id"]);
891  }
892  }
893  }
894  if ($type == "incl") { // content snippet
895  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
896  include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
897  if (ilObjMEdiaPool::isItemIdInTree($this->object->getId(), $id)) {
898  $not_inserted[] = ilMediaPoolPage::lookupTitle($id) . " [" .
899  $id . "]";
900  } else {
901  $original = new ilMediaPoolPage($id);
902 
903  // copy the page into the pool
904  $item = new ilMediaPoolItem();
905  $item->setType("pg");
906  $item->setTitle(ilMediaPoolItem::lookupTitle($id));
907  $item->create();
908  if ($item->getId() > 0) {
909  $this->object->insertInTree($item->getId(), $_GET["mepitem_id"]);
910 
911  // create page
912  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
913  $page = new ilMediaPoolPage();
914  $page->setId($item->getId());
915  $page->setParentId($this->object->getId());
916  $page->create();
917 
918  // copy content
919  $original->copy($page->getId(), $page->getParentType(), $page->getParentId(), true);
920  }
921  }
922  }
923  }
924  }
925  if (count($not_inserted) > 0) {
926  ilUtil::sendInfo($this->lng->txt("mep_not_insert_already_exist") . "<br>" .
927  implode($not_inserted, "<br>"), true);
928  }
929  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
930  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$type
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id
static _lookupTitle($a_id)
lookup object title
Class ilMediaPoolPage.
static lookupTitle($a_page_id)
Lookup title.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Create styles array
The data for the language used.
Media Pool Item.
static lookupTitle($a_id)
Lookup title.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ listMedia()

ilObjMediaPoolGUI::listMedia ( )

list media objects

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

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilMainMenuGUI\_checkAdministrationPermission(), ilObject2GUI\checkPermission(), and setContentSubTabs().

469  {
470  $ilAccess = $this->access;
471  $tpl = $this->tpl;
472  $ilTabs = $this->tabs;
474  $ilToolbar = $this->toolbar;
475  $lng = $this->lng;
476 
477  $ilCtrl->setParameter($this, "mep_mode", "listMedia");
478 
479  $this->checkPermission("read");
480 
481  $ilTabs->setTabActive("content");
482  $this->setContentSubTabs("content");
483 
484  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
485  $ilToolbar->addButton(
486  $lng->txt("mep_create_mob"),
487  $ilCtrl->getLinkTarget($this, "createMediaObject")
488  );
489 
490  $mset = new ilSetting("mobs");
491  if ($mset->get("mep_activate_pages")) {
492  $ilToolbar->addButton(
493  $lng->txt("mep_create_content_snippet"),
494  $ilCtrl->getLinkTarget($this, "createMediaPoolPage")
495  );
496  }
497 
498  $ilToolbar->addButton(
499  $lng->txt("mep_create_folder"),
500  $ilCtrl->getLinkTarget($this, "createFolderForm")
501  );
502 
503  if (trim($mset->get("upload_dir")) != "" && ilMainMenuGUI::_checkAdministrationPermission()) {
504  $ilToolbar->addButton(
505  $lng->txt("mep_create_from_upload_dir"),
506  $ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles")
507  );
508  }
509  }
510 
511  // tree
512  include_once("./Modules/MediaPool/classes/class.ilMediaPoolExplorerGUI.php");
513  $exp = new ilMediaPoolExplorerGUI($this, "listMedia", $this->object);
514  if (!$exp->handleCommand()) {
515  $this->tpl->setLeftNavContent($exp->getHTML());
516  } else {
517  return;
518  }
519 
520  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
521  $mep_table_gui = new ilMediaPoolTableGUI($this, "listMedia", $this->object, "mepitem_id");
522  $tpl->setContent($mep_table_gui->getHTML());
523  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Media pool explorer GUI class.
global $ilCtrl
Definition: ilias.php:18
setContentSubTabs($a_active)
Set sub tabs for content tab.
static _checkAdministrationPermission()
TableGUI class for recent changes in wiki.
+ Here is the call graph for this function:

◆ openClipboard()

ilObjMediaPoolGUI::openClipboard ( )

paste from clipboard

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

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilCtrl, and ilObject2GUI\checkPermission().

840  {
842  $ilAccess = $this->access;
843 
844  $this->checkPermission("write");
845 
846  $ilCtrl->setParameterByClass(
847  "ileditclipboardgui",
848  "returnCommand",
849  rawurlencode($ilCtrl->getLinkTarget(
850  $this,
851  "insertFromClipboard",
852  "",
853  false,
854  false
855  ))
856  );
857  $ilCtrl->redirectByClass("ilEditClipboardGUI", "getObject");
858  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ remove()

ilObjMediaPoolGUI::remove ( )

confirm deletion of

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

References $_GET, $_POST, ilObjectGUI\$access, ilObjectGUI\$obj_id, ilObject2GUI\checkPermission(), and ilUtil\sendSuccess().

945  {
946  $ilAccess = $this->access;
947 
948  $this->checkPermission("write");
949 
950  foreach ($_POST["id"] as $obj_id) {
951  $this->object->deleteChild($obj_id);
952  }
953 
954  ilUtil::sendSuccess($this->lng->txt("cont_obj_removed"), true);
955  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
956  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
$_POST["username"]
+ Here is the call graph for this function:

◆ resetFilter()

ilObjMediaPoolGUI::resetFilter ( )

Reset filter.

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

References allMedia(), and ilMediaPoolTableGUI\IL_MEP_EDIT.

605  {
606  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
607  $mtab = new ilMediaPoolTableGUI(
608  $this,
609  "allMedia",
610  $this->object,
611  "mepitem_id",
613  true
614  );
615  $mtab->resetFilter();
616  $mtab->resetOffset();
617  $this->allMedia();
618  }
allMedia()
list all objects
TableGUI class for recent changes in wiki.
+ Here is the call graph for this function:

◆ saveFolder()

ilObjMediaPoolGUI::saveFolder ( )

Save folder form.

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

References $_GET, $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObject2GUI\checkPermission(), initFolderForm(), object, and ilUtil\sendSuccess().

1076  {
1077  $tpl = $this->tpl;
1078  $lng = $this->lng;
1079  $ilCtrl = $this->ctrl;
1080 
1081  $this->checkPermission("write");
1082 
1083  $this->initFolderForm("create");
1084  if ($this->form->checkInput()) {
1085  if ($this->object->createFolder($_POST["title"], (int) $_GET["mepitem_id"])) {
1086  ilUtil::sendSuccess($lng->txt("mep_folder_created"), true);
1087  }
1088  $ilCtrl->redirect($this, "listMedia");
1089  }
1090 
1091  $this->form->setValuesByPost();
1092  $tpl->setContent($this->form->getHtml());
1093  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
initFolderForm($a_mode="edit")
Init folder form.
global $ilCtrl
Definition: ilias.php:18
Create new PHPExcel object
obj_idprivate
$_POST["username"]
+ Here is the call graph for this function:

◆ saveMediaPoolPage()

ilObjMediaPoolGUI::saveMediaPoolPage ( )

Save media pool page.

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

References $_GET, $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObject2GUI\$tree, ilObject2GUI\checkPermission(), initMediaPoolPageForm(), and object.

1227  {
1228  $tpl = $this->tpl;
1229  $lng = $this->lng;
1230  $ilCtrl = $this->ctrl;
1231 
1232  $this->checkPermission("write");
1233 
1234  $this->initMediaPoolPageForm("create");
1235  if ($this->form->checkInput()) {
1236  // create media pool item
1237  include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1238  $item = new ilMediaPoolItem();
1239  $item->setTitle($_POST["title"]);
1240  $item->setType("pg");
1241  $item->create();
1242 
1243  if ($item->getId() > 0) {
1244  // put in tree
1245  $tree = $this->object->getTree();
1246  $parent = $_GET["mepitem_id"] > 0
1247  ? $_GET["mepitem_id"]
1248  : $tree->getRootId();
1249  $this->object->insertInTree($item->getId(), $parent);
1250 
1251  // create page
1252  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1253  $page = new ilMediaPoolPage();
1254  $page->setId($item->getId());
1255  $page->setParentId($this->object->getId());
1256  $page->create();
1257 
1258  $ilCtrl->setParameterByClass("ilmediapoolpagegui", "mepitem_id", $item->getId());
1259  $ilCtrl->redirectByClass("ilmediapoolpagegui", "edit");
1260  }
1261  $ilCtrl->redirect($this, "listMedia");
1262  }
1263 
1264  $this->form->setValuesByPost();
1265  $tpl->setContent($this->form->getHtml());
1266  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
Class ilMediaPoolPage.
initMediaPoolPageForm($a_mode="edit")
Init page form.
global $ilCtrl
Definition: ilias.php:18
Media Pool Item.
Create new PHPExcel object
obj_idprivate
$_POST["username"]
+ Here is the call graph for this function:

◆ selectUploadDirFiles()

ilObjMediaPoolGUI::selectUploadDirFiles (   $a_files = null)

Select files from upload directory.

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

References $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $options, $si, $tab, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilMainMenuGUI\_checkAdministrationPermission(), array, and ilObject2GUI\checkPermission().

1678  {
1679  $tpl = $this->tpl;
1680  $ilTabs = $this->tabs;
1681  $lng = $this->lng;
1682  $ilCtrl = $this->ctrl;
1683  $ilToolbar = $this->toolbar;
1684 
1685  if (!$a_files) {
1686  $a_files = $_POST["file"];
1687  }
1688 
1689  $ilTabs->clearTargets();
1690  $ilTabs->setBackTarget(
1691  $lng->txt("back"),
1692  $ilCtrl->getLinkTarget($this, "listMedia")
1693  );
1694 
1695  $this->checkPermission("write");
1696 
1698 
1699  // action type
1700  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1701  $options = array(
1702  "rename" => $lng->txt("mep_up_dir_move"),
1703  "copy" => $lng->txt("mep_up_dir_copy"),
1704  );
1705  $si = new ilSelectInputGUI("", "action");
1706  $si->setOptions($options);
1707  $ilToolbar->addInputItem($si);
1708  $ilToolbar->setCloseFormTag(false);
1709  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1710  $ilToolbar->setFormName("mep_up_form");
1711 
1712  include_once("./Modules/MediaPool/classes/class.ilUploadDirFilesTableGUI.php");
1714  $this,
1715  "selectUploadDirFiles",
1716  $a_files
1717  );
1718  $tab->setFormName("mep_up_form");
1719  $tpl->setContent($tab->getHTML());
1720  }
1721  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
This class represents a selection list property in a property form.
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
static _checkAdministrationPermission()
$_POST["username"]
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjMediaPoolGUI::setContentSubTabs (   $a_active)

Set sub tabs for content tab.

Parameters
string

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

References $_GET, ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilCtrl, and $tabs.

Referenced by allMedia(), executeCommand(), and listMedia().

1438  {
1439  $ilAccess = $this->access;
1440  $ilTabs = $this->tabs;
1441  $ilCtrl = $this->ctrl;
1442 
1443  $ilTabs->addSubTab("content", $this->lng->txt("objs_fold"), $this->ctrl->getLinkTarget($this, ""));
1444 
1445  $ilCtrl->setParameter($this, "mepitem_id", "");
1446  $ilTabs->addSubTab("mep_all_mobs", $this->lng->txt("mep_all_mobs"), $this->ctrl->getLinkTarget($this, "allMedia"));
1447  $ilCtrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
1448 
1449  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
1450  $ilTabs->addSubtab(
1451  "srt_files",
1452  $this->lng->txt("mep_media_subtitles"),
1453  $ilCtrl->getLinkTargetByClass("ilmobmultisrtuploadgui", "")
1454  );
1455  }
1456 
1457  $ilTabs->activateSubTab($a_active);
1458  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ setMediaPoolPageTabs()

ilObjMediaPoolGUI::setMediaPoolPageTabs ( )

Set media pool page tabs.

Parameters

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

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $tabs, array, and object.

Referenced by editMediaPoolPage(), executeCommand(), and showMediaPoolPageUsages().

1343  {
1344  $ilTabs = $this->tabs;
1345  $ilCtrl = $this->ctrl;
1346  $lng = $this->lng;
1347 
1348  // $ilTabs->clearTargets();
1349  //$ilTabs->addTab("mep_pg_prop", $lng->txt("mep_page_properties"),
1350  // $ilCtrl->getLinkTarget($this, "editMediaPoolPage"));
1351  $ilTabs->addTarget(
1352  "cont_usage",
1353  $ilCtrl->getLinkTarget($this, "showMediaPoolPageUsages"),
1354  array("showMediaPoolPageUsages", "showAllMediaPoolPageUsages"),
1355  get_class($this)
1356  );
1357  $ilTabs->addTarget(
1358  "settings",
1359  $ilCtrl->getLinkTarget($this, "editMediaPoolPage"),
1360  "editMediaPoolPage",
1361  get_class($this)
1362  );
1363  $ilCtrl->setParameter($this, "mepitem_id", $this->object->getPoolTree()->getParentId($_GET["mepitem_id"]));
1364  $ilTabs->setBackTarget($lng->txt("mep_folder"), $ilCtrl->getLinkTarget($this, "listMedia"));
1365  $ilCtrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
1366  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjMediaPoolGUI::setSettingsSubTabs (   $a_active)

Set setting sub tabs.

Parameters

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

References ilObjectGUI\$access, ilObjectGUI\$lng, and $tabs.

Referenced by edit(), and executeCommand().

1558  {
1559  $ilTabs = $this->tabs;
1560  $lng = $this->lng;
1561  $ilAccess = $this->access;
1562 
1563  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1564  $ilTabs->addSubTab(
1565  "settings",
1566  $lng->txt("settings"),
1567  $this->ctrl->getLinkTarget($this, "edit")
1568  );
1569 
1570  $mset = new ilSetting("mobs");
1571  if ($mset->get("mep_activate_pages")) {
1572  $ilTabs->addSubTabTarget(
1573  "obj_multilinguality",
1574  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
1575  );
1576  }
1577  }
1578 
1579  $ilTabs->setSubTabActive($a_active);
1580  }
+ Here is the caller graph for this function:

◆ setTabs()

ilObjMediaPoolGUI::setTabs ( )

Set tabs.

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

References $_GET, ilObjectGUI\$access, ilObjectGUI\$ctrl, $help, $ilCtrl, $tabs, and array.

1465  {
1466  $ilAccess = $this->access;
1467  $ilTabs = $this->tabs;
1468  $ilCtrl = $this->ctrl;
1469  $ilHelp = $this->help;
1470 
1471  $ilHelp->setScreenIdComponent("mep");
1472 
1473  if ($ilAccess->checkAccess('read', '', $this->ref_id) ||
1474  $ilAccess->checkAccess('write', '', $this->ref_id)) {
1475  $ilTabs->addTab("content", $this->lng->txt("mep_content"), $this->ctrl->getLinkTarget($this, ""));
1476  //$ilTabs->addTarget("objs_fold", $this->ctrl->getLinkTarget($this, ""),
1477  // "listMedia", "", "_top");
1478 
1479  //$ilCtrl->setParameter($this, "mepitem_id", "");
1480  //$ilTabs->addTarget("mep_all_mobs", $this->ctrl->getLinkTarget($this, "allMedia"),
1481  // "allMedia", "", "_top");
1482  //$ilCtrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
1483  }
1484 
1485  // info tab
1486  if ($ilAccess->checkAccess('visible', '', $this->ref_id) ||
1487  $ilAccess->checkAccess('read', '', $this->ref_id) ||
1488  $ilAccess->checkAccess('write', '', $this->ref_id)) {
1489  $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui"
1490  || strtolower($_GET["cmdClass"]) == "ilnotegui")
1491  ? true
1492  : false;
1493  //echo "-$force_active-";
1494  $ilTabs->addTarget(
1495  "info_short",
1496  $this->ctrl->getLinkTargetByClass(
1497  array("ilobjmediapoolgui", "ilinfoscreengui"),
1498  "showSummary"
1499  ),
1500  array("showSummary", "infoScreen"),
1501  "",
1502  "",
1503  $force_active
1504  );
1505  }
1506 
1507  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1508  $ilTabs->addTarget(
1509  "settings",
1510  $this->ctrl->getLinkTarget($this, "edit"),
1511  "edit",
1512  array("", "ilobjmediapoolgui")
1513  );
1514  }
1515 
1516  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1517  $ilTabs->addTarget(
1518  "clipboard",
1519  $this->ctrl->getLinkTarget($this, "openClipboard"),
1520  "view",
1521  "ileditclipboardgui"
1522  );
1523  }
1524 
1525  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1526  $ilTabs->addTarget(
1527  "export",
1528  $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1529  "",
1530  "ilexportgui"
1531  );
1532 
1533  $ilTabs->addTarget(
1534  "import",
1535  $this->ctrl->getLinkTargetByClass("ilmediapoolimportgui", ""),
1536  "",
1537  "ilmediapoolimportgui"
1538  );
1539  }
1540 
1541  if ($ilAccess->checkAccess("edit_permission", "", $this->object->getRefId())) {
1542  $ilTabs->addTarget(
1543  "perm_settings",
1544  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1545  array("perm","info","owner"),
1546  'ilpermissiongui'
1547  );
1548  }
1549  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.

◆ showAllMediaPoolPageUsages()

ilObjMediaPoolGUI::showAllMediaPoolPageUsages ( )

List usages of the contnet snippet.

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

References showMediaPoolPageUsages().

1372  {
1373  $this->showMediaPoolPageUsages(true);
1374  }
showMediaPoolPageUsages($a_all=false)
List usages of the contnet snippet.
+ Here is the call graph for this function:

◆ showFullscreen()

ilObjMediaPoolGUI::showFullscreen ( )

show fullscreen

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

References showMedia().

779  {
780  $this->showMedia();
781  }
showMedia()
show media object
+ Here is the call graph for this function:

◆ showMedia()

ilObjMediaPoolGUI::showMedia ( )
protected

show media object

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

References $_GET, $output, $params, $xml, array, ilObject2GUI\checkPermission(), ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), ilUtil\getWebspaceDir(), IL_MODE_ALIAS, IL_MODE_OUTPUT, ilObjMediaObjectGUI\includePresentationJS(), xslt_create(), xslt_error(), and xslt_free().

Referenced by showFullscreen(), and showPreview().

649  {
650  $this->checkPermission("read");
651 
652  $item = new ilMediaPoolItem((int) $_GET["mepitem_id"]);
653  $mob_id = $item->getForeignId();
654 
655  $this->tpl = new ilTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
656  include_once("Services/Style/Content/classes/class.ilObjStyleSheet.php");
657  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
658  $this->tpl->setVariable(
659  "LOCATION_CONTENT_STYLESHEET",
661  );
662 
663 
664  require_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
665  require_once("./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
667  $media_obj = new ilObjMediaObject((int) $mob_id);
668 
669 
670  $this->tpl->setVariable("TITLE", " - " . $media_obj->getTitle());
671 
672  $xml = "<dummy>";
673  // todo: we get always the first alias now (problem if mob is used multiple
674  // times in page)
675  $xml.= $media_obj->getXML(IL_MODE_ALIAS);
676  $xml.= $media_obj->getXML(IL_MODE_OUTPUT);
677  $xml.= $link_xml;
678  $xml.="</dummy>";
679 
680  $xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
681  $args = array( '/_xml' => $xml, '/_xsl' => $xsl );
682  $xh = xslt_create();
683 
684  $wb_path = ilUtil::getWebspaceDir("output") . "/";
685 
686  $mode = ($_GET["cmd"] != "showPreview")
687  ? "fullscreen"
688  : "media";
689  $enlarge_path = ilUtil::getImagePath("enlarge.svg", false, "output");
690  $fullscreen_link =
691  $this->ctrl->getLinkTarget($this, "showFullscreen", "", false, false);
692  $params = array('mode' => $mode, 'enlarge_path' => $enlarge_path,
693  'link_params' => "ref_id=" . $_GET["ref_id"],'fullscreen_link' => $fullscreen_link,
694  'ref_id' => $_GET["ref_id"], 'pg_frame' => $pg_frame, 'webspace_path' => $wb_path);
695  $output = xslt_process($xh, "arg:/_xml", "arg:/_xsl", null, $args, $params);
696  echo xslt_error($xh);
697  xslt_free($xh);
698  // unmask user html
699  $this->tpl->setVariable("MEDIA_CONTENT", $output);
700  }
$params
Definition: disable.php:11
xslt_create()
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
xslt_free(&$proc)
static includePresentationJS($a_tpl=null)
Include media object presentation JS.
xslt_error(&$proc)
$xml
Definition: metadata.php:240
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
Class ilObjMediaObject.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
const IL_MODE_ALIAS
Create styles array
The data for the language used.
Media Pool Item.
const IL_MODE_OUTPUT
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showMediaPoolPageUsages()

ilObjMediaPoolGUI::showMediaPoolPageUsages (   $a_all = false)

List usages of the contnet snippet.

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

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $table, $tabs, ilObjectGUI\$tpl, ilObject2GUI\checkPermission(), and setMediaPoolPageTabs().

Referenced by showAllMediaPoolPageUsages().

1381  {
1382  $ilTabs = $this->tabs;
1383  $ilCtrl = $this->ctrl;
1384  $lng = $this->lng;
1385  $tpl = $this->tpl;
1386 
1387  $this->checkPermission("write");
1388 
1389  $ilTabs->clearTargets();
1390 
1391  $ilTabs->addSubTab(
1392  "current_usages",
1393  $lng->txt("cont_current_usages"),
1394  $ilCtrl->getLinkTarget($this, "showMediaPoolPageUsages")
1395  );
1396 
1397  $ilTabs->addSubTab(
1398  "all_usages",
1399  $lng->txt("cont_all_usages"),
1400  $ilCtrl->getLinkTarget($this, "showAllMediaPoolPageUsages")
1401  );
1402 
1403  if ($a_all) {
1404  $ilTabs->activateSubTab("all_usages");
1405  $cmd = "showAllMediaPoolPageUsages";
1406  } else {
1407  $ilTabs->activateSubTab("current_usages");
1408  $cmd = "showMediaPoolPageUsages";
1409  }
1410 
1411 
1412  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1413  $mep_page_gui = new ilMediaPoolPageGUI($_GET["mepitem_id"], $_GET["old_nr"]);
1414  $mep_page_gui->getTabs();
1415 
1416  $this->setMediaPoolPageTabs();
1417 
1418  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1419  $page = new ilMediaPoolPage((int) $_GET["mepitem_id"]);
1420 
1421  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageUsagesTableGUI.php");
1422  $table = new ilMediaPoolPageUsagesTableGUI($this, $cmd, $page, $a_all);
1423 
1424  $tpl->setContent($table->getHTML());
1425  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
Class ilMediaPoolPage.
TableGUI class for media pool page usages listing.
setMediaPoolPageTabs()
Set media pool page tabs.
global $ilCtrl
Definition: ilias.php:18
if(empty($password)) $table
Definition: pwgen.php:24
Class ilMediaPoolPage GUI class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPage()

ilObjMediaPoolGUI::showPage ( )

Show page.

Parameters

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

References $_GET, $ret, ilObjectGUI\$tpl, exit, ilObjStyleSheet\getContentStylePath(), ilUtil\getStyleSheetLocation(), and ilObjStyleSheet\getSyntaxStylePath().

Referenced by showPreview().

709  {
710  $tpl = $this->tpl;
711 
712  $tpl = new ilTemplate("tpl.main.html", true, true);
713 
714  include_once("./Services/Container/classes/class.ilContainerPage.php");
715  include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
716 
717  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
718  $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
719  $tpl->setVariable(
720  "LOCATION_CONTENT_STYLESHEET",
722  );
723  $tpl->setCurrentBlock("SyntaxStyle");
724  $tpl->setVariable(
725  "LOCATION_SYNTAX_STYLESHEET",
727  );
728  $tpl->parseCurrentBlock();
729 
730  // get page object
731  //include_once("./Services/Object/classes/class.ilObjectTranslation.php");
732  //$ot = ilObjectTranslation::getInstance($this->object->getId());
733  //$lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
734  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
735  $page_gui = new ilMediaPoolPageGUI((int) $_GET["mepitem_id"]);
736  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
737  //$page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
738  // $this->object->getStyleSheetId(), $this->object->getType()));
739 
740  $page_gui->setTemplateOutput(false);
741  $page_gui->setHeader("");
742  $ret = $page_gui->showPage(true);
743 
744  $tpl->setBodyClass("ilMediaPoolPagePreviewBody");
745  $tpl->setVariable("CONTENT", $ret);
746  //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
747 
748 
749  $tpl->show();
750  exit;
751  }
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
special template class to simplify handling of ITX/PEAR
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
$ret
Definition: parser.php:6
Class ilMediaPoolPage GUI class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPreview()

ilObjMediaPoolGUI::showPreview ( )

Show content snippet.

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

References $_GET, ilObject2GUI\checkPermission(), showMedia(), and showPage().

758  {
759  $this->checkPermission("read");
760 
761  $item = new ilMediaPoolItem((int) $_GET["mepitem_id"]);
762 
763  switch ($item->getType()) {
764  case "mob":
765  $this->showMedia();
766  break;
767 
768  case "pg":
769  $this->showPage();
770  break;
771  }
772  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
Media Pool Item.
showMedia()
show media object
+ Here is the call graph for this function:

◆ updateCustom()

ilObjMediaPoolGUI::updateCustom ( ilPropertyFormGUI  $a_form)
protected

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

References ilPropertyFormGUI\getInput().

460  {
461  $this->object->setDefaultWidth($a_form->getInput("default_width"));
462  $this->object->setDefaultHeight($a_form->getInput("default_height"));
463  }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:

◆ updateFolder()

ilObjMediaPoolGUI::updateFolder ( )

Update folder.

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

References $_GET, $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObject2GUI\checkPermission(), initFolderForm(), object, and ilUtil\sendSuccess().

1099  {
1100  $lng = $this->lng;
1101  $ilCtrl = $this->ctrl;
1102  $tpl = $this->tpl;
1103 
1104  $this->checkPermission("write");
1105 
1106  $this->initFolderForm("edit");
1107  if ($this->form->checkInput()) {
1108  $item = new ilMediaPoolItem($_GET["mepitem_id"]);
1109  $item->setTitle($_POST["title"]);
1110  $item->update();
1111  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1112  $ilCtrl->setParameter(
1113  $this,
1114  "mepitem_id",
1115  $this->object->getTree()->getParentId($_GET["mepitem_id"])
1116  );
1117  $ilCtrl->redirect($this, "listMedia");
1118  }
1119 
1120  $this->form->setValuesByPost();
1121  $tpl->setContent($this->form->getHtml());
1122  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
initFolderForm($a_mode="edit")
Init folder form.
global $ilCtrl
Definition: ilias.php:18
Media Pool Item.
Create new PHPExcel object
obj_idprivate
$_POST["username"]
+ Here is the call graph for this function:

◆ updateMediaPoolPage()

ilObjMediaPoolGUI::updateMediaPoolPage ( )

Update media pool page.

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

References $_GET, $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObject2GUI\checkPermission(), initMediaPoolPageForm(), and ilUtil\sendSuccess().

1272  {
1273  $lng = $this->lng;
1274  $ilCtrl = $this->ctrl;
1275  $tpl = $this->tpl;
1276 
1277  $this->checkPermission("write");
1278 
1279  $this->initMediaPoolPageForm("edit");
1280  if ($this->form->checkInput()) {
1281  $item = new ilMediaPoolItem($_GET["mepitem_id"]);
1282  $item->setTitle($_POST["title"]);
1283  $item->update();
1284  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1285  $ilCtrl->redirect($this, "editMediaPoolPage");
1286  }
1287 
1288  $this->form->setValuesByPost();
1289  $tpl->setContent($this->form->getHtml());
1290  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
initMediaPoolPageForm($a_mode="edit")
Init page form.
global $ilCtrl
Definition: ilias.php:18
Media Pool Item.
$_POST["username"]
+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjMediaPoolGUI::$error
protected

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

Referenced by confirmRemove(), and infoScreen().

◆ $help

ilObjMediaPoolGUI::$help
protected

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

Referenced by setTabs().

◆ $output_prepared

ilObjMediaPoolGUI::$output_prepared

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

◆ $tabs


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