ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 object 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...
 
 initBulkUploadForm ()
 Init bulk upload form. More...
 
 performBulkUpload ()
 Save bulk upload form. More...
 
 initMediaBulkForm ($a_id, $a_title)
 Init media bulk form. 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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...
 
 bulkUpload ()
 Bulk upload. More...
 
 editTitlesAndDescriptions ()
 Edit titles and descriptions. More...
 
 saveTitlesAndDescriptions ()
 Save titles and descriptions. 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
 getObjectService ()
 Get object service. More...
 
 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
 
 $main_tpl
 
 $upload
 
 $mep_log
 
- 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
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

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

References $DIC, and ilLoggerFactory\getLogger().

62  {
63  global $DIC;
64 
65  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
66 
67  $this->tabs = $DIC->tabs();
68  $this->error = $DIC["ilErr"];
69  $this->locator = $DIC["ilLocator"];
70  $this->help = $DIC["ilHelp"];
71 
72  $this->main_tpl = $DIC->ui()->mainTemplate();
73 
74  $this->upload = $DIC->upload();
75 
76  $this->mep_log = ilLoggerFactory::getLogger("mep");
77  }
global $DIC
Definition: saml.php:7
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjMediaPoolGUI::_goto (   $a_target)
static

goto target media pool

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

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

1698  {
1699  global $DIC;
1700 
1701  $ilAccess = $DIC->access();
1702  $ilErr = $DIC["ilErr"];
1703  $lng = $DIC->language();
1704 
1705  $targets = explode('_', $a_target);
1706  if (count((array) $targets) > 1) {
1707  $ref_id = $targets[0];
1708  $subitem_id = $targets[1];
1709  } else {
1710  $ref_id = $targets[0];
1711  }
1712 
1713  if ($ilAccess->checkAccess("read", "", $ref_id)) {
1714  $_GET["baseClass"] = "ilMediaPoolPresentationGUI";
1715  $_GET["ref_id"] = $ref_id;
1716  $_GET['mepitem_id'] = $subitem_id;
1717  include("ilias.php");
1718  exit;
1719  } elseif ($ilAccess->checkAccess("visible", "", $ref_id)) {
1720  $_GET["baseClass"] = "ilMediaPoolPresentationGUI";
1721  $_GET["ref_id"] = $ref_id;
1722  $_GET["cmd"] = "infoScreen";
1723  include("ilias.php");
1724  exit;
1725  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1726  ilUtil::sendFailure(sprintf(
1727  $lng->txt("msg_no_perm_read_item"),
1729  ), true);
1731  }
1732 
1733  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1734  }
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)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
exit
Definition: backend.php:16
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjMediaPoolGUI::addLocatorItems ( )

add locator items for media pool

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

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

1105  {
1106  $ilLocator = $this->locator;
1107  $ilAccess = $this->access;
1108 
1109  if (!$this->getCreationMode() && $this->ctrl->getCmd() != "explorer") {
1110  $tree = $this->object->getTree();
1111  $obj_id = ($_GET["mepitem_id"] == "")
1112  ? $tree->getRootId()
1113  : $_GET["mepitem_id"];
1114  $path = $tree->getPathFull($obj_id);
1115  foreach ($path as $node) {
1116  if ($node["child"] == $tree->getRootId()) {
1117  $this->ctrl->setParameter($this, "mepitem_id", "");
1118  if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
1119  $link = $this->ctrl->getLinkTarget($this, "listMedia");
1120  } elseif ($ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
1121  $link = $this->ctrl->getLinkTarget($this, "infoScreen");
1122  }
1123  $title = $this->object->getTitle();
1124  $this->ctrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
1125  $ilLocator->addItem($title, $link, "", $_GET["ref_id"]);
1126  }
1127  }
1128  }
1129  }
$path
Definition: aliased.php:25
$_GET["client_id"]
+ Here is the call graph for this function:

◆ afterConstructor()

ilObjMediaPoolGUI::afterConstructor ( )
protected

Initialisation.

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

References ilObjectGUI\$lng.

85  {
86  $lng = $this->lng;
87 
88  $lng->loadLanguageModule("mep");
89 
90  if ($this->ctrl->getCmd() == "explorer") {
91  $this->ctrl->saveParameter($this, array("ref_id"));
92  } else {
93  $this->ctrl->saveParameter($this, array("ref_id", "mepitem_id"));
94  }
95  $this->ctrl->saveParameter($this, array("mep_mode"));
96 
97  $lng->loadLanguageModule("content");
98  }

◆ afterSave()

ilObjMediaPoolGUI::afterSave ( ilObject  $newObj)

save object

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

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

450  {
451  // always send a message
452  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
453 
454  //ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
455  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=" . $newObj->getRefId() . "&cmd=listMedia");
456  }
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 634 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().

635  {
636  $tpl = $this->tpl;
637  $ilTabs = $this->tabs;
640 
641  $ilCtrl->setParameter($this, "mep_mode", "allMedia");
642 
643  $this->checkPermission("read");
644  $ilTabs->setTabActive("content");
645  $this->setContentSubTabs("mep_all_mobs");
646 
647 
648  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
649  $mep_table_gui = new ilMediaPoolTableGUI(
650  $this,
651  "allMedia",
652  $this->object,
653  "mepitem_id",
655  true
656  );
657 
658 
659  if (isset($_GET['force_filter']) and $_GET['force_filter']) {
660  $_POST['title'] = ilMediaPoolItem::lookupTitle((int) $_GET['force_filter']);
661 
662  include_once("./Services/Table/classes/class.ilTablePropertiesStorage.php");
663  $tprop = new ilTablePropertiesStorage();
664  $tprop->storeProperty(
665  $mep_table_gui->getId(),
666  $ilUser->getId(),
667  'filter',
668  1
669  );
670  $mep_table_gui->resetFilter();
671  $mep_table_gui->resetOffset();
672  $mep_table_gui->writeFilterToSession();
673 
674  // Read again
675  $mep_table_gui = new ilMediaPoolTableGUI(
676  $this,
677  "allMedia",
678  $this->object,
679  "mepitem_id",
681  true
682  );
683  }
684 
685  $tpl->setContent($mep_table_gui->getHTML());
686  }
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 691 of file class.ilObjMediaPoolGUI.php.

References allMedia(), and ilMediaPoolTableGUI\IL_MEP_EDIT.

692  {
693  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
694  $mtab = new ilMediaPoolTableGUI(
695  $this,
696  "allMedia",
697  $this->object,
698  "mepitem_id",
700  true
701  );
702  $mtab->writeFilterToSession();
703  $mtab->resetOffset();
704  $this->allMedia();
705  }
allMedia()
list all objects
TableGUI class for recent changes in wiki.
+ Here is the call graph for this function:

◆ bulkUpload()

ilObjMediaPoolGUI::bulkUpload ( )
protected

Bulk upload.

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

References $form, $main_tpl, ilObject2GUI\checkPermission(), and initBulkUploadForm().

1991  {
1992  $this->checkPermission("write");
1993 
1995 
1996  $form = $this->initBulkUploadForm();
1997  $main_tpl->setContent($form->getHTML());
1998  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
initBulkUploadForm()
Init bulk upload form.
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ cancelFolderUpdate()

ilObjMediaPoolGUI::cancelFolderUpdate ( )

Cancel save.

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

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

1267  {
1268  $ilCtrl = $this->ctrl;
1269  $ilCtrl->setParameter(
1270  $this,
1271  "mepitem_id",
1272  $this->object->getTree()->getParentId($_GET["mepitem_id"])
1273  );
1274  $ilCtrl->redirect($this, "listMedia");
1275  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ cancelRemove()

ilObjMediaPoolGUI::cancelRemove ( )

cancel deletion of media objects/folders

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

References $_GET.

1043  {
1044  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1045  }
$_GET["client_id"]

◆ cancelSave()

ilObjMediaPoolGUI::cancelSave ( )

Cancel save.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

1281  {
1282  $ilCtrl = $this->ctrl;
1283  $ilCtrl->redirect($this, "listMedia");
1284  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmRemove()

ilObjMediaPoolGUI::confirmRemove ( )

confirm remove of mobs

Definition at line 892 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().

893  {
895  $lng = $this->lng;
897 
898  $this->checkPermission("write");
899 
900  if (!isset($_POST["id"])) {
901  $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
902  }
903 
904  // display confirmation message
905  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
906  $cgui = new ilConfirmationGUI();
907  $cgui->setFormAction($this->ctrl->getFormAction($this));
908  $cgui->setHeaderText($this->lng->txt("info_remove_sure"));
909  $cgui->setCancel($this->lng->txt("cancel"), "cancelRemove");
910  $cgui->setConfirm($this->lng->txt("confirm"), "remove");
911 
912  foreach ($_POST["id"] as $obj_id) {
915 
916  // check whether page can be removed
917  $add = "";
918  if ($type == "pg") {
919  include_once("./Services/COPage/classes/class.ilPageContentUsage.php");
920  $usages = ilPageContentUsage::getUsages("incl", $obj_id, false);
921  if (count($usages) > 0) {
922  ilUtil::sendFailure(sprintf($lng->txt("mep_content_snippet_in_use"), $title), true);
923  $ilCtrl->redirect($this, "listMedia");
924  } else {
925  // check whether the snippet is used in older versions of pages
926  $usages = ilPageContentUsage::getUsages("incl", $obj_id, true);
927  if (count($usages) > 0) {
928  $add = "<div class='small'>" . $lng->txt("mep_content_snippet_used_in_older_versions") . "</div>";
929  }
930  }
931  }
932 
933  $caption = ilUtil::getImageTagByType($type, $this->tpl->tplPath) .
934  " " . $title . $add;
935 
936  $cgui->addItem("id[]", $obj_id, $caption);
937  }
938 
939  $this->tpl->setContent($cgui->getHTML());
940  }
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 1068 of file class.ilObjMediaPoolGUI.php.

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

1069  {
1070  $ilUser = $this->user;
1071  $ilAccess = $this->access;
1072 
1073  $this->checkPermission("write");
1074 
1075  if (!isset($_POST["id"])) {
1076  ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1077  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1078  }
1079 
1080  foreach ($_POST["id"] as $obj_id) {
1082  if ($type == "fold") {
1083  ilUtil::sendFailure($this->lng->txt("cont_cant_copy_folders"), true);
1084  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1085  }
1086  }
1087  foreach ($_POST["id"] as $obj_id) {
1088  $fid = ilMediaPoolItem::lookupForeignId($obj_id);
1090  if ($type == "mob") {
1091  $ilUser->addObjectToClipboard($fid, "mob", "");
1092  }
1093  if ($type == "pg") {
1094  $ilUser->addObjectToClipboard($obj_id, "incl", "");
1095  }
1096  }
1097  ilUtil::sendSuccess($this->lng->txt("copied_to_clipboard"), true);
1098  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1099  }
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 1138 of file class.ilObjMediaPoolGUI.php.

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

1139  {
1140  $ilAccess = $this->access;
1141  $tpl = $this->tpl;
1142 
1143  $this->checkPermission("write");
1144 
1145  $this->initFolderForm("create");
1146  $tpl->setContent($this->form->getHTML());
1147  }
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 1838 of file class.ilObjMediaPoolGUI.php.

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

1839  {
1840  $this->checkPermission("write");
1841 
1842  $mset = new ilSetting("mobs");
1843  $upload_dir = trim($mset->get("upload_dir"));
1844 
1845  include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1846 
1847  if (is_array($_POST["file"]) && ilMainMenuGUI::_checkAdministrationPermission()) {
1848  foreach ($_POST["file"] as $f) {
1849  $f = str_replace("..", "", $f);
1850  $fullpath = $upload_dir . "/" . $f;
1851  $mob = new ilObjMediaObject();
1852  $mob->setTitle(basename($fullpath));
1853  $mob->setDescription("");
1854  $mob->create();
1855 
1856  // determine and create mob directory, move uploaded file to directory
1857  //$mob_dir = ilUtil::getWebspaceDir()."/mobs/mm_".$a_mob->getId();
1858  $mob->createDirectory();
1859  $mob_dir = ilObjMediaObject::_getDirectory($mob->getId());
1860 
1861  $media_item = new ilMediaItem();
1862  $mob->addMediaItem($media_item);
1863  $media_item->setPurpose("Standard");
1864 
1865  $file = $mob_dir . "/" . basename($fullpath);
1866 
1867  // virus handling
1868  $vir = ilUtil::virusHandling($fullpath, basename($fullpath));
1869  if (!$vir[0]) {
1870  ilUtil::sendFailure($this->lng->txt("file_is_infected") . "<br />" . $vir[1], true);
1871  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=" .
1872  $_GET["ref_id"] . "&mepitem_id=" . $_GET["mepitem_id"]);
1873  }
1874 
1875  switch ($_POST["action"]) {
1876  case "rename":
1877  rename($fullpath, $file);
1878  break;
1879 
1880  case "copy":
1881  copy($fullpath, $file);
1882  break;
1883  }
1884 
1885  // get mime type
1887  $location = basename($fullpath);
1888 
1889  // set real meta and object data
1890  $media_item->setFormat($format);
1891  $media_item->setLocation($location);
1892  $media_item->setLocationType("LocalFile");
1893 
1894  $mob->setDescription($format);
1895 
1896  // determine width and height of known image types
1898  $format,
1899  "File",
1900  $mob_dir . "/" . $location,
1901  $media_item->getLocation(),
1902  true,
1903  true,
1904  "",
1905  ""
1906  );
1907  $media_item->setWidth($wh["width"]);
1908  $media_item->setHeight($wh["height"]);
1909  if ($wh["info"] != "") {
1910  // ilUtil::sendInfo($wh["info"], true);
1911  }
1912 
1913  $media_item->setHAlign("Left");
1914  ilUtil::renameExecutables($mob_dir);
1915  $mob->update();
1916 
1917 
1918  // put it into current folder
1919  $mep_item = new ilMediaPoolItem();
1920  $mep_item->setTitle($mob->getTitle());
1921  $mep_item->setType("mob");
1922  $mep_item->setForeignId($mob->getId());
1923  $mep_item->create();
1924 
1925  $tree = $this->object->getTree();
1926  $parent = ($_GET["mepitem_id"] == "")
1927  ? $tree->getRootId()
1928  : $_GET["mepitem_id"];
1929  $tree->insertNode($mep_item->getId(), $parent);
1930  }
1931  }
1932  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=" .
1933  $_GET["ref_id"] . "&mepitem_id=" . $_GET["mepitem_id"]);
1934  }
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 absolute directory.
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()
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 433 of file class.ilObjMediaPoolGUI.php.

434  {
435  $this->ctrl->redirectByClass("ilobjmediaobjectgui", "create");
436  }

◆ createMediaPoolPage()

ilObjMediaPoolGUI::createMediaPoolPage ( )

Create new content snippet.

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

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

1294  {
1295  $tpl = $this->tpl;
1296 
1297  $this->checkPermission("write");
1298 
1299  $this->initMediaPoolPageForm("create");
1300  $tpl->setContent($this->form->getHTML());
1301  }
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 object

public

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

References $form, ilObjectGUI\$ilErr, ilObjectGUI\$tabs_gui, ilObjectGUI\$tpl, $values, ilObjectGUI\addExternalEditFormCustom(), ilObject2GUI\checkPermissionBool(), ilObjectGUI\getEditFormValues(), ilObjectGUI\initEditForm(), and setSettingsSubTabs().

509  {
510  $tpl = $this->tpl;
511  $ilTabs = $this->tabs_gui;
513 
514  $this->setSettingsSubTabs("settings");
515 
516  if (!$this->checkPermissionBool("write")) {
517  $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
518  }
519 
520  $ilTabs->activateTab("settings");
521 
522  $form = $this->initEditForm();
523  $values = $this->getEditFormValues();
524  if ($values) {
525  $form->setValuesByArray($values, true);
526  }
527 
529 
530  $tpl->setContent($form->getHTML());
531  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
setSettingsSubTabs($a_active)
Set setting sub tabs.
addExternalEditFormCustom(ilPropertyFormGUI $a_form)
if(isset($_POST['submit'])) $form
$values
initEditForm()
Init object edit form.
getEditFormValues()
Get values for edit form.
+ Here is the call graph for this function:

◆ editFolder()

ilObjMediaPoolGUI::editFolder ( )

Edit folder.

Parameters

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

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

1156  {
1157  $tpl = $this->tpl;
1158 
1159  $this->checkPermission("write");
1160 
1161  $this->initFolderForm();
1162  $this->getFolderValues();
1163  $tpl->setContent($this->form->getHTML());
1164  }
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 1309 of file class.ilObjMediaPoolGUI.php.

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

1310  {
1311  $tpl = $this->tpl;
1312  $ilTabs = $this->tabs;
1313 
1314  $this->checkPermission("write");
1315 
1316  $ilTabs->clearTargets();
1317 
1318  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1319  $mep_page_gui = new ilMediaPoolPageGUI($_GET["mepitem_id"], $_GET["old_nr"]);
1320  $mep_page_gui->getTabs();
1321 
1322  $this->setMediaPoolPageTabs();
1323 
1324  $this->initMediaPoolPageForm("edit");
1325  $this->getMediaPoolPageValues();
1326  $tpl->setContent($this->form->getHTML());
1327  }
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:

◆ editTitlesAndDescriptions()

ilObjMediaPoolGUI::editTitlesAndDescriptions ( )
protected

Edit titles and descriptions.

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

References $_GET, ilObjectGUI\$ctrl, $form, $html, ilObjectGUI\$lng, $main_tpl, ilAccordionGUI\ALL_CLOSED, ilObject2GUI\checkPermission(), ilMediaItem\getMediaItemsForUploadHash(), and initMediaBulkForm().

2124  {
2125  $ctrl = $this->ctrl;
2126  $lng = $this->lng;
2127 
2128  $this->checkPermission("write");
2129  $ctrl->saveParameter($this, "mep_hash");
2130 
2132 
2133  include_once("./Services/MediaObjects/classes/class.ilMediaItem.php");
2134  $media_items = ilMediaItem::getMediaItemsForUploadHash($_GET["mep_hash"]);
2135 
2136  include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
2137 
2138  $tb = new ilToolbarGUI();
2139  $tb->setFormAction($ctrl->getFormAction($this));
2140  $tb->addFormButton($lng->txt("save"), "saveTitlesAndDescriptions");
2141  $tb->setOpenFormTag(true);
2142  $tb->setCloseFormTag(false);
2143  $tb->setId("tb_top");
2144 
2145  $html = $tb->getHTML();
2146  foreach ($media_items as $mi) {
2147  $acc = new ilAccordionGUI();
2148  $acc->setBehaviour(ilAccordionGUI::ALL_CLOSED);
2149  $acc->setId("acc_" . $mi["mob_id"]);
2150 
2151  $mob = new ilObjMediaObject($mi["mob_id"]);
2152  $form = $this->initMediaBulkForm($mi["mob_id"], $mob->getTitle());
2153  $acc->addItem($mob->getTitle(), $form->getHTML());
2154 
2155  $html .= $acc->getHTML();
2156  }
2157 
2158  $html .= $tb->getHTML();
2159  $tb->setOpenFormTag(false);
2160  $tb->setCloseFormTag(true);
2161  $tb->setId("tb_bottom");
2162 
2163  $main_tpl->setContent($html);
2164  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
if(isset($_POST['submit'])) $form
Class ilObjMediaObject.
static getMediaItemsForUploadHash($a_hash)
Get media items for upload hash.
initMediaBulkForm($a_id, $a_title)
Init media bulk form.
Accordion user interface class.
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

◆ executeCommand()

ilObjMediaPoolGUI::executeCommand ( )

execute command

Returns
bool|void
Exceptions
ilCtrlException

Definition at line 114 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(), ilObject2GUI\prepareOutput(), ilUtil\redirect(), setContentSubTabs(), ilObject2GUI\setCreationMode(), ilObject2GUI\setLocator(), setMediaPoolPageTabs(), ilFileSystemGUI\setPostDirPath(), and setSettingsSubTabs().

115  {
116  $ilTabs = $this->tabs;
117  $lng = $this->lng;
118  $ilAccess = $this->access;
119  $tpl = $this->tpl;
121 
122  if ($this->ctrl->getRedirectSource() == "ilinternallinkgui") {
123  $this->explorer();
124  return;
125  }
126 
127  $next_class = $this->ctrl->getNextClass($this);
128  $cmd = $this->ctrl->getCmd();
129  $new_type = $_POST["new_type"]
130  ? $_POST["new_type"]
131  : $_GET["new_type"];
132 
133  if ($new_type != "" && ($cmd != "confirmRemove" && $cmd != "copyToClipboard"
134  && $cmd != "pasteFromClipboard")) {
135  $this->setCreationMode(true);
136  }
137 
138  if (!$this->getCreationMode()) {
139  $tree = $this->object->getTree();
140  if ($_GET["mepitem_id"] == "") {
141  $_GET["mepitem_id"] = $tree->getRootId();
142  }
143  }
144  if ($cmd == "create") {
145  switch ($_POST["new_type"]) {
146  case "mob":
147  $this->ctrl->redirectByClass("ilobjmediaobjectgui", "create");
148  break;
149 
150  case "fold":
151  $this->ctrl->redirectByClass("ilobjfoldergui", "create");
152  break;
153  }
154  }
155 
156  switch ($next_class) {
157  case 'ilobjectmetadatagui':
158  $this->checkPermission("write");
159 
160  $this->prepareOutput();
161  $this->addHeaderAction();
162 
163  $this->tabs_gui->activateTab('meta_data');
164  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
165  $md_gui = new ilObjectMetaDataGUI($this->object, 'mob');
166  $this->ctrl->forwardCommand($md_gui);
167  $this->tpl->show();
168  break;
169 
170 
171  case 'ilmediapoolpagegui':
172  $this->checkPermission("write");
173  $this->prepareOutput();
174  $this->addHeaderAction();
175  $ilTabs->clearTargets();
176  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
177  $mep_page_gui = new ilMediaPoolPageGUI($_GET["mepitem_id"], $_GET["old_nr"]);
178 
179  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
180  $mep_page_gui->setEnableEditing(false);
181  }
182  $ret = $this->ctrl->forwardCommand($mep_page_gui);
183  if ($ret != "") {
184  $tpl->setContent($ret);
185  }
186  $this->setMediaPoolPageTabs();
187  $this->tpl->show();
188  break;
189 
190  case "ilobjmediaobjectgui":
191  $this->checkPermission("write");
192  if ($cmd == "create" || $cmd == "save" || $cmd == "cancel") {
193  $ret_obj = $_GET["mepitem_id"];
194  $ilObjMediaObjectGUI = new ilObjMediaObjectGUI("", 0, false, false);
195  $ilObjMediaObjectGUI->setWidthPreset($this->object->getDefaultWidth());
196  $ilObjMediaObjectGUI->setHeightPreset($this->object->getDefaultHeight());
197  } else {
198  $ret_obj = $tree->getParentId($_GET["mepitem_id"]);
199  $ilObjMediaObjectGUI = new ilObjMediaObjectGUI("", ilMediaPoolItem::lookupForeignId($_GET["mepitem_id"]), false, false);
200  $this->ctrl->setParameter($this, "mepitem_id", $this->getParentFolderId());
201  $ilTabs->setBackTarget(
202  $lng->txt("back"),
203  $this->ctrl->getLinkTarget(
204  $this,
205  $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia"
206  )
207  );
208  }
209  if ($this->ctrl->getCmdClass() == "ilinternallinkgui") {
210  $this->ctrl->setReturn($this, "explorer");
211  } else {
212  $this->ctrl->setParameter($this, "mepitem_id", $ret_obj);
213  $this->ctrl->setReturn(
214  $this,
215  $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia"
216  );
217  $this->ctrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
218  }
219  $this->getTemplate();
220  $ilObjMediaObjectGUI->setTabs();
221  $this->setLocator();
222 
223  // set adv metadata record dobject
224  $ilObjMediaObjectGUI->setAdvMdRecordObject($this->object->getRefId(), "mep", "mob");
225 
226  $ret = $this->ctrl->forwardCommand($ilObjMediaObjectGUI);
227 
228  if ($cmd == "save" && $ret != false) {
229  $mep_item = new ilMediaPoolItem();
230  $mep_item->setTitle($ret->getTitle());
231  $mep_item->setType("mob");
232  $mep_item->setForeignId($ret->getId());
233  $mep_item->create();
234 
235  $parent = ($_GET["mepitem_id"] == "")
236  ? $tree->getRootId()
237  : $_GET["mepitem_id"];
238  $tree->insertNode($mep_item->getId(), $parent);
239  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=" .
240  $_GET["ref_id"] . "&mepitem_id=" . $_GET["mepitem_id"]);
241  } else {
242  $this->tpl->show();
243  }
244  break;
245 
246  case "ilobjfoldergui":
247  $this->checkPermission("write");
248  $this->addHeaderAction();
249  $folder_gui = new ilObjFolderGUI("", 0, false, false);
250  $this->ctrl->setReturn($this, "listMedia");
251  $cmd .= "Object";
252  switch ($cmd) {
253  case "createObject":
254  $this->prepareOutput();
255  $folder_gui = new ilObjFolderGUI("", 0, false, false);
256  $folder_gui->setFormAction(
257  "save",
258  $this->ctrl->getFormActionByClass("ilobjfoldergui")
259  );
260  $folder_gui->createObject();
261  $this->tpl->show();
262  break;
263 
264  case "saveObject":
265  //$folder_gui->setReturnLocation("save", $this->ctrl->getLinkTarget($this, "listMedia"));
266  $parent = ($_GET["mepitem_id"] == "")
267  ? $tree->getRootId()
268  : $_GET["mepitem_id"];
269  $folder_gui->setFolderTree($tree);
270  $folder_gui->saveObject($parent);
271  //$this->ctrl->redirect($this, "listMedia");
272  break;
273 
274  case "editObject":
275  $this->prepareOutput();
276  $folder_gui = new ilObjFolderGUI("", ilMediaPoolItem::lookupForeignId($_GET["mepitem_id"]), false, false);
277  $this->ctrl->setParameter($this, "foldereditmode", "1");
278  $folder_gui->setFormAction("update", $this->ctrl->getFormActionByClass("ilobjfoldergui"));
279  $folder_gui->editObject();
280  $this->tpl->show();
281  break;
282 
283  case "updateObject":
284  $folder_gui = new ilObjFolderGUI("", ilMediaPoolItem::lookupForeignId($_GET["mepitem_id"]), false, false);
285  $this->ctrl->setParameter($this, "mepitem_id", $this->getParentFolderId());
286  $this->ctrl->setReturn($this, "listMedia");
287  $folder_gui->updateObject(true); // this returns to parent
288  break;
289 
290  case "cancelObject":
291  if ($_GET["foldereditmode"]) {
292  $this->ctrl->setParameter($this, "mepitem_id", $this->getParentFolderId());
293  }
294  $this->ctrl->redirect($this, "listMedia");
295  break;
296  }
297  break;
298 
299  case "ileditclipboardgui":
300  $this->prepareOutput();
301  $this->addHeaderAction();
302  $this->ctrl->setReturn($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
303  $clip_gui = new ilEditClipboardGUI();
304  $clip_gui->setMultipleSelections(true);
305  $clip_gui->setInsertButtonTitle($lng->txt("mep_copy_to_mep"));
306  $ilTabs->setTabActive("clipboard");
307  $this->ctrl->forwardCommand($clip_gui);
308  $this->tpl->show();
309  break;
310 
311  case 'ilinfoscreengui':
312  $this->prepareOutput();
313  $this->addHeaderAction();
314  $this->infoScreen();
315  $this->tpl->show();
316  break;
317 
318  case 'ilpermissiongui':
319  $this->checkPermission("edit_permission");
320  $this->prepareOutput();
321  $this->addHeaderAction();
322  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
323  $perm_gui = new ilPermissionGUI($this);
324  $this->ctrl->forwardCommand($perm_gui);
325  $this->tpl->show();
326  break;
327 
328  case "ilexportgui":
329  $this->checkPermission("write");
330  $this->prepareOutput();
331  $this->addHeaderAction();
332  include_once("./Services/Export/classes/class.ilExportGUI.php");
333  $exp_gui = new ilExportGUI($this);
334  $exp_gui->addFormat("xml");
335  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
336  $ot = ilObjectTranslation::getInstance($this->object->getId());
337  if ($ot->getContentActivated()) {
338  $exp_gui->addFormat("xml_master", "XML (" . $lng->txt("mep_master_language_only") . ")", $this, "export");
339  $exp_gui->addFormat("xml_masternomedia", "XML (" . $lng->txt("mep_master_language_only_no_media") . ")", $this, "export");
340  }
341  $this->ctrl->forwardCommand($exp_gui);
342  $this->tpl->show();
343  break;
344 
345  case "ilfilesystemgui":
346  $this->checkPermission("write");
347  $this->prepareOutput();
348  $this->addHeaderAction();
349  $ilTabs->clearTargets();
350  $ilTabs->setBackTarget(
351  $lng->txt("back"),
352  $ilCtrl->getLinkTarget($this, "listMedia")
353  );
354  $mset = new ilSetting("mobs");
355  if (trim($mset->get("upload_dir")) != "") {
356  include_once("./Services/FileSystem/classes/class.ilFileSystemGUI.php");
357  $fs_gui = new ilFileSystemGUI($mset->get("upload_dir"));
358  $fs_gui->setPostDirPath(true);
359  $fs_gui->setTableId("mepud" . $this->object->getId());
360  $fs_gui->setAllowFileCreation(false);
361  $fs_gui->setAllowDirectoryCreation(false);
362  $fs_gui->clearCommands();
363  $fs_gui->addCommand(
364  $this,
365  "selectUploadDirFiles",
366  $this->lng->txt("mep_sel_upload_dir_files"),
367  false,
368  true
369  );
370  $this->ctrl->forwardCommand($fs_gui);
371  }
372  $this->tpl->show();
373  break;
374 
375  case "ilcommonactiondispatchergui":
376  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
378  $this->ctrl->forwardCommand($gui);
379  break;
380 
381  case 'ilobjecttranslationgui':
382  $this->prepareOutput();
383  $this->addHeaderAction();
384  //$this->setTabs("settings");
385  $ilTabs->activateTab("settings");
386  $this->setSettingsSubTabs("obj_multilinguality");
387  include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
388  $transgui = new ilObjectTranslationGUI($this);
389  $transgui->setTitleDescrOnlyMode(false);
390  $this->ctrl->forwardCommand($transgui);
391  $this->tpl->show();
392  break;
393 
394  case "ilmediapoolimportgui":
395  $this->prepareOutput();
396  $this->addHeaderAction();
397  $ilTabs->activateTab("import");
398  include_once("./Modules/MediaPool/classes/class.ilMediaPoolImportGUI.php");
399  $gui = new ilMediaPoolImportGUI($this->object);
400  $this->ctrl->forwardCommand($gui);
401  $this->tpl->show();
402  break;
403 
404  case "ilmobmultisrtuploadgui":
405  $this->checkPermission("write");
406  $this->prepareOutput();
407  $this->addHeaderAction();
408  //$this->setTabs("content");
409  $this->setContentSubTabs("srt_files");
410  include_once("./Services/MediaObjects/classes/class.ilMobMultiSrtUploadGUI.php");
411  include_once("./Modules/MediaPool/classes/class.ilMepMultiSrt.php");
412  $gui = new ilMobMultiSrtUploadGUI(new ilMepMultiSrt($this->object));
413  $this->ctrl->forwardCommand($gui);
414  $this->tpl->show();
415  break;
416 
417 
418  default:
419  $this->prepareOutput();
420  $this->addHeaderAction();
421  $cmd = $this->ctrl->getCmd("listMedia");
422  $this->$cmd();
423  if (!$this->getCreationMode()) {
424  $this->tpl->show();
425  }
426  break;
427  }
428  }
setLocator()
set Locator
Class ilObjectMetaDataGUI.
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.
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 1971 of file class.ilObjMediaPoolGUI.php.

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

1972  {
1973  $ot = ilObjectTranslation::getInstance($this->object->getId());
1974  $opt = "";
1975  if ($ot->getContentActivated()) {
1976  $format = explode("_", $_POST["format"]);
1977  $opt = ilUtil::stripSlashes($format[1]);
1978  }
1979 
1980  $this->object->exportXML($opt);
1981  }
$format
Definition: metadata.php:141
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
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 534 of file class.ilObjMediaPoolGUI.php.

535  {
536  if ($this->object->getDefaultWidth() > 0) {
537  $a_values["default_width"] = $this->object->getDefaultWidth();
538  }
539  if ($this->object->getDefaultHeight() > 0) {
540  $a_values["default_height"] = $this->object->getDefaultHeight();
541  }
542  }

◆ getFolderValues()

ilObjMediaPoolGUI::getFolderValues ( )

Get current values for folder from.

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

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

Referenced by editFolder().

1170  {
1171  $values = array();
1172 
1173  $values["title"] = ilMediaPoolItem::lookupTitle($_GET["mepitem_id"]);
1174 
1175  $this->form->setValuesByArray($values);
1176  }
$_GET["client_id"]
$values
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 1432 of file class.ilObjMediaPoolGUI.php.

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

Referenced by editMediaPoolPage().

1433  {
1434  $values = array();
1435 
1436  include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1437  $values["title"] = ilMediaPoolItem::lookupTitle($_GET["mepitem_id"]);
1438 
1439  $this->form->setValuesByArray($values);
1440  }
$_GET["client_id"]
$values
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 738 of file class.ilObjMediaPoolGUI.php.

References $_GET.

Referenced by executeCommand().

739  {
740  if ($_GET["mepitem_id"] == "") {
741  return "";
742  }
743  $par_id = $this->object->getPoolTree()->getParentId($_GET["mepitem_id"]);
744  if ($par_id != $this->object->getPoolTree()->getRootId()) {
745  return $par_id;
746  } else {
747  return "";
748  }
749  }
$_GET["client_id"]
+ 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 1939 of file class.ilObjMediaPoolGUI.php.

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

Referenced by ilMediaPoolTableGUI\getHTML().

1940  {
1941  global $DIC;
1942 
1943  $tpl = $DIC["tpl"];
1944  $ilCtrl = $DIC->ctrl();
1945  $lng = $DIC->language();
1946 
1947  require_once("./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1949 
1950  $tpl->addJavaScript("./Modules/MediaPool/js/ilMediaPool.js");
1951 
1952  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", "");
1953  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "ref_id", $a_mpool_ref_id);
1954  $tpl->addOnloadCode("il.MediaPool.setPreviewUrl('" . $ilCtrl->getLinkTargetByClass(array("ilmediapoolpresentationgui", "ilobjmediapoolgui"), "showPreview", "", false, false) . "');");
1955  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", $_GET["mepitem_id"]);
1956  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "ref_id", $_GET["red_id"]);
1957 
1958  include_once("./Services/UIComponent/Modal/classes/class.ilModalGUI.php");
1959  $modal = ilModalGUI::getInstance();
1960  $modal->setHeading($lng->txt("preview"));
1961  $modal->setId("ilMepPreview");
1962  $modal->setType(ilModalGUI::TYPE_LARGE);
1963  $modal->setBody("<iframe id='ilMepPreviewContent'></iframe>");
1964 
1965  return $modal->getHTML();
1966  }
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
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 729 of file class.ilObjMediaPoolGUI.php.

Referenced by executeCommand().

730  {
731  $this->tpl->getStandardTemplate();
732  }
+ Here is the caller graph for this function:

◆ getType()

ilObjMediaPoolGUI::getType ( )
final

Get type.

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

104  {
105  return "mep";
106  }

◆ infoScreen()

ilObjMediaPoolGUI::infoScreen ( )

show information screen

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

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

Referenced by executeCommand(), and infoScreenObject().

1752  {
1753  $this->tabs->activateTab("info_short");
1754  $ilAccess = $this->access;
1755  $ilErr = $this->error;
1756 
1757  if (!$ilAccess->checkAccess("visible", "", $this->ref_id) &&
1758  !$ilAccess->checkAccess("read", "", $this->ref_id) &&
1759  !$ilAccess->checkAccess("write", "", $this->ref_id)) {
1760  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
1761  }
1762 
1763  if ($this->ctrl->getCmd() == "infoScreen") {
1764  $this->ctrl->setCmd("showSummary");
1765  $this->ctrl->setCmdClass("ilinfoscreengui");
1766  }
1767 
1768  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1769  $info = new ilInfoScreenGUI($this);
1770 
1771  $info->enablePrivateNotes();
1772 
1773 
1774  // standard meta data
1775  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1776 
1777  // forward the command
1778  $this->ctrl->forwardCommand($info);
1779  }
Class ilInfoScreenGUI.
$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 1741 of file class.ilObjMediaPoolGUI.php.

References infoScreen().

1742  {
1743  $this->ctrl->setCmd("showSummary");
1744  $this->ctrl->setCmdClass("ilinfoscreengui");
1745  $this->infoScreen();
1746  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initBulkUploadForm()

ilObjMediaPoolGUI::initBulkUploadForm ( )

Init bulk upload form.

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

References ilObjectGUI\$ctrl, $form, ilObjectGUI\$lng, and ilFileStandardDropzoneInputGUI\setUploadUrl().

Referenced by bulkUpload(), and performBulkUpload().

2004  {
2005  $ctrl = $this->ctrl;
2006  $lng = $this->lng;
2007 
2008  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2009  $form = new ilPropertyFormGUI();
2010 
2011  $form->setFormAction($ctrl->getFormAction($this));
2012  $form->setPreventDoubleSubmission(false);
2013 
2014  $item = new ilFileStandardDropzoneInputGUI(
2015  'cancel',
2016  $lng->txt("mep_media_files"),
2017  'media_files'
2018  );
2019  $item->setUploadUrl($ctrl->getLinkTarget($this, "performBulkUpload", "", true, true));
2020  $item->setMaxFiles(20);
2021  $form->addItem($item);
2022 
2023  $form->addCommandButton("performBulkUpload", $lng->txt("upload"));
2024 
2025  $form->setTitle($lng->txt("mep_bulk_upload"));
2026 
2027  return $form;
2028  }
This class represents a property form user interface.
if(isset($_POST['submit'])) $form
setUploadUrl($upload_url)
Set the URL (using ilCtrl->getFormAction() ) to override the Endpoint the Form will be sent to...
Class ilFileStandardDropzoneInputGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjMediaPoolGUI::initCreationForms (   $a_new_type)
protected

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

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

439  {
440  $forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type),
441  self::CFORM_IMPORT => $this->initImportForm($a_new_type));
442 
443  return $forms;
444  }
initImportForm($a_new_type)
Init object import form.
initCreateForm($a_new_type)
Init object creation form.
+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjMediaPoolGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

References ilObjectGUI\$object_service, ilPropertyFormGUI\addItem(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilNumberInputGUI\setMinValue(), and ilNumberInputGUI\setSuffix().

459  {
460  $obj_service = $this->object_service;
461 
462  // default width
463  $ni = new ilNumberInputGUI($this->lng->txt("mep_default_width"), "default_width");
464  $ni->setMinValue(0);
465  $ni->setSuffix("px");
466  $ni->setMaxLength(5);
467  $ni->setSize(5);
468  $a_form->addItem($ni);
469 
470  // default height
471  $ni = new ilNumberInputGUI($this->lng->txt("mep_default_height"), "default_height");
472  $ni->setSuffix("px");
473  $ni->setMinValue(0);
474  $ni->setMaxLength(5);
475  $ni->setSize(5);
476  $ni->setInfo($this->lng->txt("mep_default_width_height_info"));
477  $a_form->addItem($ni);
478 
479  // presentation
480  $pres = new ilFormSectionHeaderGUI();
481  $pres->setTitle($this->lng->txt('obj_presentation'));
482  $a_form->addItem($pres);
483 
484  // tile image
485  $obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
486 
487  // additional features
488  $feat = new ilFormSectionHeaderGUI();
489  $feat->setTitle($this->lng->txt('obj_features'));
490  $a_form->addItem($feat);
491 
492  include_once './Services/Container/classes/class.ilContainer.php';
493  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
495  $this->object->getId(),
496  $a_form,
497  array(
499  )
500  );
501  }
This class represents a section header in a property form.
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.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings 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 1235 of file class.ilObjMediaPoolGUI.php.

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

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

1236  {
1237  $lng = $this->lng;
1238  $ilCtrl = $this->ctrl;
1239 
1240  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1241  $this->form = new ilPropertyFormGUI();
1242 
1243  // desc
1244  $ti = new ilTextInputGUI($lng->txt("title"), "title");
1245  $ti->setMaxLength(128);
1246  $ti->setRequired(true);
1247  $this->form->addItem($ti);
1248 
1249  // save and cancel commands
1250  if ($a_mode == "create") {
1251  $this->form->addCommandButton("saveFolder", $lng->txt("save"));
1252  $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
1253  $this->form->setTitle($lng->txt("mep_new_folder"));
1254  } else {
1255  $this->form->addCommandButton("updateFolder", $lng->txt("save"));
1256  $this->form->addCommandButton("cancelFolderUpdate", $lng->txt("cancel"));
1257  $this->form->setTitle($lng->txt("mep_edit_folder"));
1258  }
1259 
1260  $this->form->setFormAction($ilCtrl->getFormAction($this));
1261  }
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:

◆ initMediaBulkForm()

ilObjMediaPoolGUI::initMediaBulkForm (   $a_id,
  $a_title 
)

Init media bulk form.

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

References $form, ilObjectGUI\$lng, and ilTextInputGUI\setValue().

Referenced by editTitlesAndDescriptions(), and saveTitlesAndDescriptions().

2170  {
2171  $lng = $this->lng;
2172 
2173  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2174  $form = new ilPropertyFormGUI();
2175  $form->setOpenTag(false);
2176  $form->setCloseTag(false);
2177 
2178  // title
2179  $ti = new ilTextInputGUI($lng->txt("title"), "title_" . $a_id);
2180  $ti->setValue($a_title);
2181  $form->addItem($ti);
2182 
2183  // description
2184  $ti = new ilTextAreaInputGUI($lng->txt("description"), "description_" . $a_id);
2185  $form->addItem($ti);
2186 
2187  return $form;
2188  }
This class represents a property form user interface.
if(isset($_POST['submit'])) $form
This class represents a text property in a property form.
This class represents a text area property in a property form.
setValue($a_value)
Set Value.
+ 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 1402 of file class.ilObjMediaPoolGUI.php.

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

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

1403  {
1404  $lng = $this->lng;
1405  $ilCtrl = $this->ctrl;
1406 
1407  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1408  $this->form = new ilPropertyFormGUI();
1409 
1410  // title
1411  $ti = new ilTextInputGUI($lng->txt("title"), "title");
1412  $ti->setMaxLength(128);
1413  $ti->setRequired(true);
1414  $this->form->addItem($ti);
1415 
1416  // save and cancel commands
1417  if ($a_mode == "create") {
1418  $this->form->addCommandButton("saveMediaPoolPage", $lng->txt("save"));
1419  $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
1420  $this->form->setTitle($lng->txt("mep_new_content_snippet"));
1421  } else {
1422  $this->form->addCommandButton("updateMediaPoolPage", $lng->txt("save"));
1423  $this->form->setTitle($lng->txt("mep_edit_content_snippet"));
1424  }
1425 
1426  $this->form->setFormAction($ilCtrl->getFormAction($this));
1427  }
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 970 of file class.ilObjMediaPoolGUI.php.

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

971  {
972  $ilAccess = $this->access;
973 
974  $this->checkPermission("write");
975 
976  include_once("./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
978  $not_inserted = array();
979  if (is_array($ids)) {
980  foreach ($ids as $id2) {
981  $id = explode(":", $id2);
982  $type = $id[0];
983  $id = $id[1];
984 
985  if ($type == "mob") { // media object
986  if (ilObjMEdiaPool::isForeignIdInTree($this->object->getId(), $id)) {
987  $not_inserted[] = ilObject::_lookupTitle($id) . " [" .
988  $id . "]";
989  } else {
990  $item = new ilMediaPoolItem();
991  $item->setType("mob");
992  $item->setForeignId($id);
993  $item->setTitle(ilObject::_lookupTitle($id));
994  $item->create();
995  if ($item->getId() > 0) {
996  $this->object->insertInTree($item->getId(), $_GET["mepitem_id"]);
997  }
998  }
999  }
1000  if ($type == "incl") { // content snippet
1001  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1002  include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1003  if (ilObjMEdiaPool::isItemIdInTree($this->object->getId(), $id)) {
1004  $not_inserted[] = ilMediaPoolPage::lookupTitle($id) . " [" .
1005  $id . "]";
1006  } else {
1007  $original = new ilMediaPoolPage($id);
1008 
1009  // copy the page into the pool
1010  $item = new ilMediaPoolItem();
1011  $item->setType("pg");
1012  $item->setTitle(ilMediaPoolItem::lookupTitle($id));
1013  $item->create();
1014  if ($item->getId() > 0) {
1015  $this->object->insertInTree($item->getId(), $_GET["mepitem_id"]);
1016 
1017  // create page
1018  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1019  $page = new ilMediaPoolPage();
1020  $page->setId($item->getId());
1021  $page->setParentId($this->object->getId());
1022  $page->create();
1023 
1024  // copy content
1025  $original->copy($page->getId(), $page->getParentType(), $page->getParentId(), true);
1026  }
1027  }
1028  }
1029  }
1030  }
1031  if (count($not_inserted) > 0) {
1032  ilUtil::sendInfo($this->lng->txt("mep_not_insert_already_exist") . "<br>" .
1033  implode($not_inserted, "<br>"), true);
1034  }
1035  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1036  }
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.
Media Pool Item.
static lookupTitle($a_id)
Lookup title.
+ Here is the call graph for this function:

◆ listMedia()

ilObjMediaPoolGUI::listMedia ( )

list media objects

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

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

570  {
571  $ilAccess = $this->access;
572  $tpl = $this->tpl;
573  $ilTabs = $this->tabs;
575  $ilToolbar = $this->toolbar;
576  $lng = $this->lng;
577 
578  $ilCtrl->setParameter($this, "mep_mode", "listMedia");
579 
580  $this->checkPermission("read");
581 
582  $ilTabs->setTabActive("content");
583  $this->setContentSubTabs("content");
584 
585  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
586  $ilToolbar->addButton(
587  $lng->txt("mep_create_mob"),
588  $ilCtrl->getLinkTarget($this, "createMediaObject")
589  );
590 
591  $mset = new ilSetting("mobs");
592  if ($mset->get("mep_activate_pages")) {
593  $ilToolbar->addButton(
594  $lng->txt("mep_create_content_snippet"),
595  $ilCtrl->getLinkTarget($this, "createMediaPoolPage")
596  );
597  }
598 
599  $ilToolbar->addButton(
600  $lng->txt("mep_create_folder"),
601  $ilCtrl->getLinkTarget($this, "createFolderForm")
602  );
603 
604  if (trim($mset->get("upload_dir")) != "" && ilMainMenuGUI::_checkAdministrationPermission()) {
605  $ilToolbar->addButton(
606  $lng->txt("mep_create_from_upload_dir"),
607  $ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles")
608  );
609  }
610 
611  $ilToolbar->addButton(
612  $lng->txt("mep_bulk_upload"),
613  $ilCtrl->getLinkTarget($this, "bulkUpload")
614  );
615  }
616 
617  // tree
618  include_once("./Modules/MediaPool/classes/class.ilMediaPoolExplorerGUI.php");
619  $exp = new ilMediaPoolExplorerGUI($this, "listMedia", $this->object);
620  if (!$exp->handleCommand()) {
621  $this->tpl->setLeftNavContent($exp->getHTML());
622  } else {
623  return;
624  }
625 
626  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
627  $mep_table_gui = new ilMediaPoolTableGUI($this, "listMedia", $this->object, "mepitem_id");
628  $tpl->setContent($mep_table_gui->getHTML());
629  }
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 945 of file class.ilObjMediaPoolGUI.php.

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

946  {
948  $ilAccess = $this->access;
949 
950  $this->checkPermission("write");
951 
952  $ilCtrl->setParameterByClass(
953  "ileditclipboardgui",
954  "returnCommand",
955  rawurlencode($ilCtrl->getLinkTarget(
956  $this,
957  "insertFromClipboard",
958  "",
959  false,
960  false
961  ))
962  );
963  $ilCtrl->redirectByClass("ilEditClipboardGUI", "getObject");
964  }
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:

◆ performBulkUpload()

ilObjMediaPoolGUI::performBulkUpload ( )

Save bulk upload form.

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

References $_GET, $_POST, ilObjectGUI\$ctrl, $form, $format, ilObjectGUI\$lng, $location, $log, $main_tpl, $mep_log, $result, $title, ilObject2GUI\$tree, $upload, ilObjMediaObject\_getRelativeDirectory(), ilObject2GUI\checkPermission(), ilObjMediaObject\fixFilename(), ilObjMediaObject\getMimeType(), initBulkUploadForm(), and ilUtil\stripSlashes().

2034  {
2035  $this->checkPermission("write");
2036 
2037  $ctrl = $this->ctrl;
2038  $lng = $this->lng;
2041  $log = $this->mep_log;
2042 
2043  $form = $this->initBulkUploadForm();
2044  if ($form->checkInput()) {
2045  $mep_item_ids = [];
2046  // Check if this is a request to upload a file
2047  $log->debug("checking for uploads...");
2048  if ($upload->hasUploads()) {
2049  $log->debug("has upload...");
2050  try {
2051  $upload->process();
2052  $log->debug("nr of results: " . count($upload->getResults()));
2053  foreach ($upload->getResults() as $result) {
2054  $title = $result->getName();
2055 
2056  $mob = new ilObjMediaObject();
2057  $mob->setTitle($title);
2058  $mob->setDescription("");
2059  $mob->create();
2060 
2061  $mob->createDirectory();
2062  $media_item = new ilMediaItem();
2063  $mob->addMediaItem($media_item);
2064  $media_item->setPurpose("Standard");
2065 
2066  $mob_dir = ilObjMediaObject::_getRelativeDirectory($mob->getId());
2067  $file_name = ilObjMediaObject::fixFilename($title);
2068  $file = $mob_dir . "/" . $file_name;
2069 
2070  $upload->moveOneFileTo(
2071  $result,
2072  $mob_dir,
2073  Location::WEB,
2074  $file_name,
2075  true
2076  );
2077 
2078  $mep_item = new ilMediaPoolItem();
2079  $mep_item->setTitle($title);
2080  $mep_item->setType("mob");
2081  $mep_item->setForeignId($mob->getId());
2082  $mep_item->create();
2083 
2084  $tree = $this->object->getTree();
2085  $parent = ($_GET["mepitem_id"] == "")
2086  ? $tree->getRootId()
2087  : $_GET["mepitem_id"];
2088  $tree->insertNode($mep_item->getId(), $parent);
2089 
2090  // get mime type
2092  $location = $file_name;
2093 
2094  // set real meta and object data
2095  $media_item->setFormat($format);
2096  $media_item->setLocation($location);
2097  $media_item->setLocationType("LocalFile");
2098  $media_item->setUploadHash(ilUtil::stripSlashes($_POST["ilfilehash"]));
2099  $mob->update();
2100  $mep_item_ids[] = $mob->getId();
2101  }
2102  } catch (Exception $e) {
2103  $log->debug("Got exception: " . $e->getMessage());
2104  echo json_encode(array( 'success' => false, 'message' => $e->getMessage()));
2105  }
2106  $log->debug("end of 'has_uploads'");
2107  }
2108  $log->debug("has no upload...");
2109 
2110  $log->debug("calling redirect... (" . $_POST["ilfilehash"] . ")");
2111  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
2112  $ctrl->setParameter($this, "mep_hash", $_POST["ilfilehash"]);
2113  $ctrl->redirect($this, "editTitlesAndDescriptions");
2114  }
2115 
2116  $form->setValuesByPost();
2117  $main_tpl->setContent($form->getHtml());
2118  }
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
$result
$_GET["client_id"]
$location
Definition: buildRTE.php:44
initBulkUploadForm()
Init bulk upload form.
$log
Definition: sabredav.php:21
if(isset($_POST['submit'])) $form
static fixFilename($a_name)
Fix filename of uploaded file.
Class ilMediaItem.
Class ilObjMediaObject.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Media Pool Item.
static _getRelativeDirectory($a_mob_id)
Get relative (to webspace dir) directory.
$_POST["username"]
+ Here is the call graph for this function:

◆ remove()

ilObjMediaPoolGUI::remove ( )

confirm deletion of

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

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

1051  {
1052  $ilAccess = $this->access;
1053 
1054  $this->checkPermission("write");
1055 
1056  foreach ($_POST["id"] as $obj_id) {
1057  $this->object->deleteChild($obj_id);
1058  }
1059 
1060  ilUtil::sendSuccess($this->lng->txt("cont_obj_removed"), true);
1061  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1062  }
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 710 of file class.ilObjMediaPoolGUI.php.

References allMedia(), and ilMediaPoolTableGUI\IL_MEP_EDIT.

711  {
712  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
713  $mtab = new ilMediaPoolTableGUI(
714  $this,
715  "allMedia",
716  $this->object,
717  "mepitem_id",
719  true
720  );
721  $mtab->resetFilter();
722  $mtab->resetOffset();
723  $this->allMedia();
724  }
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 1181 of file class.ilObjMediaPoolGUI.php.

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

1182  {
1183  $tpl = $this->tpl;
1184  $lng = $this->lng;
1185  $ilCtrl = $this->ctrl;
1186 
1187  $this->checkPermission("write");
1188 
1189  $this->initFolderForm("create");
1190  if ($this->form->checkInput()) {
1191  if ($this->object->createFolder($_POST["title"], (int) $_GET["mepitem_id"])) {
1192  ilUtil::sendSuccess($lng->txt("mep_folder_created"), true);
1193  }
1194  $ilCtrl->redirect($this, "listMedia");
1195  }
1196 
1197  $this->form->setValuesByPost();
1198  $tpl->setContent($this->form->getHtml());
1199  }
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
$_POST["username"]
+ Here is the call graph for this function:

◆ saveMediaPoolPage()

ilObjMediaPoolGUI::saveMediaPoolPage ( )

Save media pool page.

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

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

1333  {
1334  $tpl = $this->tpl;
1335  $lng = $this->lng;
1336  $ilCtrl = $this->ctrl;
1337 
1338  $this->checkPermission("write");
1339 
1340  $this->initMediaPoolPageForm("create");
1341  if ($this->form->checkInput()) {
1342  // create media pool item
1343  include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1344  $item = new ilMediaPoolItem();
1345  $item->setTitle($_POST["title"]);
1346  $item->setType("pg");
1347  $item->create();
1348 
1349  if ($item->getId() > 0) {
1350  // put in tree
1351  $tree = $this->object->getTree();
1352  $parent = $_GET["mepitem_id"] > 0
1353  ? $_GET["mepitem_id"]
1354  : $tree->getRootId();
1355  $this->object->insertInTree($item->getId(), $parent);
1356 
1357  // create page
1358  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1359  $page = new ilMediaPoolPage();
1360  $page->setId($item->getId());
1361  $page->setParentId($this->object->getId());
1362  $page->create();
1363 
1364  $ilCtrl->setParameterByClass("ilmediapoolpagegui", "mepitem_id", $item->getId());
1365  $ilCtrl->redirectByClass("ilmediapoolpagegui", "edit");
1366  }
1367  $ilCtrl->redirect($this, "listMedia");
1368  }
1369 
1370  $this->form->setValuesByPost();
1371  $tpl->setContent($this->form->getHtml());
1372  }
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.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveTitlesAndDescriptions()

ilObjMediaPoolGUI::saveTitlesAndDescriptions ( )
protected

Save titles and descriptions.

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

References $_GET, ilObjectGUI\$ctrl, $form, ilObjectGUI\$lng, $title, ilObject2GUI\checkPermission(), ilMediaItem\getMediaItemsForUploadHash(), and initMediaBulkForm().

2194  {
2195  $lng = $this->lng;
2196  $ctrl = $this->ctrl;
2197 
2198  $this->checkPermission("write");
2199  //var_dump(_$POST); exit;
2200 
2201  $media_items = ilMediaItem::getMediaItemsForUploadHash($_GET["mep_hash"]);
2202  include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
2203 
2204  foreach ($media_items as $mi) {
2205  $mob = new ilObjMediaObject($mi["mob_id"]);
2206  $form = $this->initMediaBulkForm($mi["mob_id"], $mob->getTitle());
2207  $form->checkInput();
2208  $title = $form->getInput("title_" . $mi["mob_id"]);
2209  $desc = $form->getInput("description_" . $mi["mob_id"]);
2210  if (trim($title) != "") {
2211  $mob->setTitle($title);
2212  }
2213  $mob->setDescription($desc);
2214  $mob->update();
2215  }
2216  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
2217  $ctrl->redirect($this, "listMedia");
2218  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
if(isset($_POST['submit'])) $form
Class ilObjMediaObject.
static getMediaItemsForUploadHash($a_hash)
Get media items for upload hash.
initMediaBulkForm($a_id, $a_title)
Init media bulk form.
+ Here is the call graph for this function:

◆ selectUploadDirFiles()

ilObjMediaPoolGUI::selectUploadDirFiles (   $a_files = null)

Select files from upload directory.

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

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

1790  {
1791  $tpl = $this->tpl;
1792  $ilTabs = $this->tabs;
1793  $lng = $this->lng;
1794  $ilCtrl = $this->ctrl;
1795  $ilToolbar = $this->toolbar;
1796 
1797  if (!$a_files) {
1798  $a_files = $_POST["file"];
1799  }
1800 
1801  $ilTabs->clearTargets();
1802  $ilTabs->setBackTarget(
1803  $lng->txt("back"),
1804  $ilCtrl->getLinkTarget($this, "listMedia")
1805  );
1806 
1807  $this->checkPermission("write");
1808 
1810 
1811  // action type
1812  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1813  $options = array(
1814  "rename" => $lng->txt("mep_up_dir_move"),
1815  "copy" => $lng->txt("mep_up_dir_copy"),
1816  );
1817  $si = new ilSelectInputGUI("", "action");
1818  $si->setOptions($options);
1819  $ilToolbar->addInputItem($si);
1820  $ilToolbar->setCloseFormTag(false);
1821  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1822  $ilToolbar->setFormName("mep_up_form");
1823 
1824  include_once("./Modules/MediaPool/classes/class.ilUploadDirFilesTableGUI.php");
1826  $this,
1827  "selectUploadDirFiles",
1828  $a_files
1829  );
1830  $tab->setFormName("mep_up_form");
1831  $tpl->setContent($tab->getHTML());
1832  }
1833  }
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
static _checkAdministrationPermission()
$_POST["username"]
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjMediaPoolGUI::setContentSubTabs (   $a_active)

Set sub tabs for content tab.

Parameters
string

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

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

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

1541  {
1542  $ilAccess = $this->access;
1543  $ilTabs = $this->tabs;
1544  $ilCtrl = $this->ctrl;
1545 
1546  $ilTabs->addSubTab("content", $this->lng->txt("objs_fold"), $this->ctrl->getLinkTarget($this, ""));
1547 
1548  $ilCtrl->setParameter($this, "mepitem_id", "");
1549  $ilTabs->addSubTab("mep_all_mobs", $this->lng->txt("mep_all_mobs"), $this->ctrl->getLinkTarget($this, "allMedia"));
1550  $ilCtrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
1551 
1552  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
1553  $ilTabs->addSubtab(
1554  "srt_files",
1555  $this->lng->txt("mep_media_subtitles"),
1556  $ilCtrl->getLinkTargetByClass("ilmobmultisrtuploadgui", "")
1557  );
1558  }
1559 
1560  $ilTabs->activateSubTab($a_active);
1561  }
$_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 1448 of file class.ilObjMediaPoolGUI.php.

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

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

1449  {
1450  $ilTabs = $this->tabs;
1451  $ilCtrl = $this->ctrl;
1452  $lng = $this->lng;
1453 
1454  $ilTabs->addTarget(
1455  "cont_usage",
1456  $ilCtrl->getLinkTarget($this, "showMediaPoolPageUsages"),
1457  array("showMediaPoolPageUsages", "showAllMediaPoolPageUsages"),
1458  get_class($this)
1459  );
1460  $ilTabs->addTarget(
1461  "settings",
1462  $ilCtrl->getLinkTarget($this, "editMediaPoolPage"),
1463  "editMediaPoolPage",
1464  get_class($this)
1465  );
1466  $ilCtrl->setParameter($this, "mepitem_id", $this->object->getPoolTree()->getParentId($_GET["mepitem_id"]));
1467  $ilTabs->setBackTarget($lng->txt("mep_folder"), $ilCtrl->getLinkTarget($this, "listMedia"));
1468  $ilCtrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
1469  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjMediaPoolGUI::setSettingsSubTabs (   $a_active)

Set setting sub tabs.

Parameters

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

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

Referenced by edit(), and executeCommand().

1669  {
1670  $ilTabs = $this->tabs;
1671  $lng = $this->lng;
1672  $ilAccess = $this->access;
1673 
1674  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1675  $ilTabs->addSubTab(
1676  "settings",
1677  $lng->txt("settings"),
1678  $this->ctrl->getLinkTarget($this, "edit")
1679  );
1680 
1681  $mset = new ilSetting("mobs");
1682  if ($mset->get("mep_activate_pages")) {
1683  $ilTabs->addSubTabTarget(
1684  "obj_multilinguality",
1685  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
1686  );
1687  }
1688  }
1689 
1690  $ilTabs->setSubTabActive($a_active);
1691  }
+ Here is the caller graph for this function:

◆ setTabs()

ilObjMediaPoolGUI::setTabs ( )

Set tabs.

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

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

1568  {
1569  $ilAccess = $this->access;
1570  $ilTabs = $this->tabs;
1571  $ilCtrl = $this->ctrl;
1572  $ilHelp = $this->help;
1573 
1574  $ilHelp->setScreenIdComponent("mep");
1575 
1576  if ($ilAccess->checkAccess('read', '', $this->ref_id) ||
1577  $ilAccess->checkAccess('write', '', $this->ref_id)) {
1578  $ilTabs->addTab("content", $this->lng->txt("mep_content"), $this->ctrl->getLinkTarget($this, ""));
1579  }
1580 
1581  // info tab
1582  if ($ilAccess->checkAccess('visible', '', $this->ref_id) ||
1583  $ilAccess->checkAccess('read', '', $this->ref_id) ||
1584  $ilAccess->checkAccess('write', '', $this->ref_id)) {
1585  $force_active = ($this->ctrl->getNextClass() == "ilinfoscreengui"
1586  || strtolower($_GET["cmdClass"]) == "ilnotegui")
1587  ? true
1588  : false;
1589  $ilTabs->addTarget(
1590  "info_short",
1591  $this->ctrl->getLinkTargetByClass(
1592  array("ilobjmediapoolgui", "ilinfoscreengui"),
1593  "showSummary"
1594  ),
1595  array("showSummary", "infoScreen"),
1596  "",
1597  "",
1598  $force_active
1599  );
1600  }
1601 
1602  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1603  $ilTabs->addTarget(
1604  "settings",
1605  $this->ctrl->getLinkTarget($this, "edit"),
1606  "edit",
1607  array("", "ilobjmediapoolgui")
1608  );
1609  }
1610 
1611  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1612  $ilTabs->addTarget(
1613  "clipboard",
1614  $this->ctrl->getLinkTarget($this, "openClipboard"),
1615  "view",
1616  "ileditclipboardgui"
1617  );
1618  }
1619 
1620  // properties
1621  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1622  // meta data
1623  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
1624  $mdgui = new ilObjectMetaDataGUI($this->object, "mob");
1625  $mdtab = $mdgui->getTab();
1626  if ($mdtab) {
1627  $ilTabs->addTarget(
1628  "meta_data",
1629  $mdtab,
1630  "",
1631  "ilobjectmetadatagui"
1632  );
1633  }
1634  }
1635 
1636  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1637  $ilTabs->addTarget(
1638  "export",
1639  $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1640  "",
1641  "ilexportgui"
1642  );
1643 
1644  $ilTabs->addTarget(
1645  "import",
1646  $this->ctrl->getLinkTargetByClass("ilmediapoolimportgui", ""),
1647  "",
1648  "ilmediapoolimportgui"
1649  );
1650  }
1651 
1652  if ($ilAccess->checkAccess("edit_permission", "", $this->object->getRefId())) {
1653  $ilTabs->addTarget(
1654  "perm_settings",
1655  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1656  array("perm","info","owner"),
1657  'ilpermissiongui'
1658  );
1659  }
1660  }
Class ilObjectMetaDataGUI.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ showAllMediaPoolPageUsages()

ilObjMediaPoolGUI::showAllMediaPoolPageUsages ( )

List usages of the contnet snippet.

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

References showMediaPoolPageUsages().

1475  {
1476  $this->showMediaPoolPageUsages(true);
1477  }
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 884 of file class.ilObjMediaPoolGUI.php.

References showMedia().

885  {
886  $this->showMedia();
887  }
showMedia()
show media object
+ Here is the call graph for this function:

◆ showMedia()

ilObjMediaPoolGUI::showMedia ( )
protected

show media object

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

References $_GET, Sabre\VObject\$output, PHPMailer\PHPMailer\$params, $xml, 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().

755  {
756  $this->checkPermission("read");
757 
758  $item = new ilMediaPoolItem((int) $_GET["mepitem_id"]);
759  $mob_id = $item->getForeignId();
760 
761  $this->tpl = new ilTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
762  include_once("Services/Style/Content/classes/class.ilObjStyleSheet.php");
763  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
764  $this->tpl->setVariable(
765  "LOCATION_CONTENT_STYLESHEET",
767  );
768 
769 
770  require_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
771  require_once("./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
773  $media_obj = new ilObjMediaObject((int) $mob_id);
774 
775 
776  $this->tpl->setVariable("TITLE", " - " . $media_obj->getTitle());
777 
778  $xml = "<dummy>";
779  // todo: we get always the first alias now (problem if mob is used multiple
780  // times in page)
781  $xml .= $media_obj->getXML(IL_MODE_ALIAS);
782  $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
783  $xml .= $link_xml;
784  $xml .= "</dummy>";
785 
786  $xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
787  $args = array( '/_xml' => $xml, '/_xsl' => $xsl );
788  $xh = xslt_create();
789 
790  $wb_path = ilUtil::getWebspaceDir("output") . "/";
791 
792  $mode = ($_GET["cmd"] != "showPreview")
793  ? "fullscreen"
794  : "media";
795  $enlarge_path = ilUtil::getImagePath("enlarge.svg", false, "output");
796  $fullscreen_link =
797  $this->ctrl->getLinkTarget($this, "showFullscreen", "", false, false);
798  $params = array('mode' => $mode, 'enlarge_path' => $enlarge_path,
799  'link_params' => "ref_id=" . $_GET["ref_id"],'fullscreen_link' => $fullscreen_link,
800  'ref_id' => $_GET["ref_id"], 'pg_frame' => $pg_frame, 'webspace_path' => $wb_path);
801  $output = xslt_process($xh, "arg:/_xml", "arg:/_xsl", null, $args, $params);
802  echo xslt_error($xh);
803  xslt_free($xh);
804  // unmask user html
805  $this->tpl->setVariable("MEDIA_CONTENT", $output);
806  }
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)
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
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 1483 of file class.ilObjMediaPoolGUI.php.

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

Referenced by showAllMediaPoolPageUsages().

1484  {
1485  $ilTabs = $this->tabs;
1486  $ilCtrl = $this->ctrl;
1487  $lng = $this->lng;
1488  $tpl = $this->tpl;
1489 
1490  $this->checkPermission("write");
1491 
1492  $ilTabs->clearTargets();
1493 
1494  $ilTabs->addSubTab(
1495  "current_usages",
1496  $lng->txt("cont_current_usages"),
1497  $ilCtrl->getLinkTarget($this, "showMediaPoolPageUsages")
1498  );
1499 
1500  $ilTabs->addSubTab(
1501  "all_usages",
1502  $lng->txt("cont_all_usages"),
1503  $ilCtrl->getLinkTarget($this, "showAllMediaPoolPageUsages")
1504  );
1505 
1506  if ($a_all) {
1507  $ilTabs->activateSubTab("all_usages");
1508  $cmd = "showAllMediaPoolPageUsages";
1509  } else {
1510  $ilTabs->activateSubTab("current_usages");
1511  $cmd = "showMediaPoolPageUsages";
1512  }
1513 
1514 
1515  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1516  $mep_page_gui = new ilMediaPoolPageGUI($_GET["mepitem_id"], $_GET["old_nr"]);
1517  $mep_page_gui->getTabs();
1518 
1519  $this->setMediaPoolPageTabs();
1520 
1521  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1522  $page = new ilMediaPoolPage((int) $_GET["mepitem_id"]);
1523 
1524  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageUsagesTableGUI.php");
1525  $table = new ilMediaPoolPageUsagesTableGUI($this, $cmd, $page, $a_all);
1526 
1527  $tpl->setContent($table->getHTML());
1528  }
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 814 of file class.ilObjMediaPoolGUI.php.

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

Referenced by showPreview().

815  {
816  $tpl = $this->tpl;
817 
818  $tpl = new ilTemplate("tpl.main.html", true, true);
819 
820  include_once("./Services/Container/classes/class.ilContainerPage.php");
821  include_once("./Services/Container/classes/class.ilContainerPageGUI.php");
822 
823  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
824  $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
825  $tpl->setVariable(
826  "LOCATION_CONTENT_STYLESHEET",
828  );
829  $tpl->setCurrentBlock("SyntaxStyle");
830  $tpl->setVariable(
831  "LOCATION_SYNTAX_STYLESHEET",
833  );
834  $tpl->parseCurrentBlock();
835 
836  // get page object
837  //include_once("./Services/Object/classes/class.ilObjectTranslation.php");
838  //$ot = ilObjectTranslation::getInstance($this->object->getId());
839  //$lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
840  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
841  $page_gui = new ilMediaPoolPageGUI((int) $_GET["mepitem_id"]);
842  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
843  //$page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
844  // $this->object->getStyleSheetId(), $this->object->getType()));
845 
846  $page_gui->setTemplateOutput(false);
847  $page_gui->setHeader("");
848  $ret = $page_gui->showPage(true);
849 
850  $tpl->setBodyClass("ilMediaPoolPagePreviewBody");
851  $tpl->setVariable("CONTENT", $ret);
852  //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
853 
854 
855  $tpl->show();
856  exit;
857  }
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
exit
Definition: backend.php:16
$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 863 of file class.ilObjMediaPoolGUI.php.

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

864  {
865  $this->checkPermission("read");
866 
867  $item = new ilMediaPoolItem((int) $_GET["mepitem_id"]);
868 
869  switch ($item->getType()) {
870  case "mob":
871  $this->showMedia();
872  break;
873 
874  case "pg":
875  $this->showPage();
876  break;
877  }
878  }
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 544 of file class.ilObjMediaPoolGUI.php.

References ilObjectGUI\$object_service, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilPropertyFormGUI\getInput(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

545  {
546  $obj_service = $this->object_service;
547 
548  $this->object->setDefaultWidth($a_form->getInput("default_width"));
549  $this->object->setDefaultHeight($a_form->getInput("default_height"));
550 
551 
552  // additional features
553  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
555  $this->object->getId(),
556  $a_form,
557  array(
559  )
560  );
561 
562  // tile image
563  $obj_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
564  }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
+ Here is the call graph for this function:

◆ updateFolder()

ilObjMediaPoolGUI::updateFolder ( )

Update folder.

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

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

1205  {
1206  $lng = $this->lng;
1207  $ilCtrl = $this->ctrl;
1208  $tpl = $this->tpl;
1209 
1210  $this->checkPermission("write");
1211 
1212  $this->initFolderForm("edit");
1213  if ($this->form->checkInput()) {
1214  $item = new ilMediaPoolItem($_GET["mepitem_id"]);
1215  $item->setTitle($_POST["title"]);
1216  $item->update();
1217  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1218  $ilCtrl->setParameter(
1219  $this,
1220  "mepitem_id",
1221  $this->object->getTree()->getParentId($_GET["mepitem_id"])
1222  );
1223  $ilCtrl->redirect($this, "listMedia");
1224  }
1225 
1226  $this->form->setValuesByPost();
1227  $tpl->setContent($this->form->getHtml());
1228  }
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.
$_POST["username"]
+ Here is the call graph for this function:

◆ updateMediaPoolPage()

ilObjMediaPoolGUI::updateMediaPoolPage ( )

Update media pool page.

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

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

1378  {
1379  $lng = $this->lng;
1380  $ilCtrl = $this->ctrl;
1381  $tpl = $this->tpl;
1382 
1383  $this->checkPermission("write");
1384 
1385  $this->initMediaPoolPageForm("edit");
1386  if ($this->form->checkInput()) {
1387  $item = new ilMediaPoolItem($_GET["mepitem_id"]);
1388  $item->setTitle($_POST["title"]);
1389  $item->update();
1390  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1391  $ilCtrl->redirect($this, "editMediaPoolPage");
1392  }
1393 
1394  $this->form->setValuesByPost();
1395  $tpl->setContent($this->form->getHtml());
1396  }
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 36 of file class.ilObjMediaPoolGUI.php.

Referenced by confirmRemove(), and infoScreen().

◆ $help

ilObjMediaPoolGUI::$help
protected

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

Referenced by setTabs().

◆ $main_tpl

ilObjMediaPoolGUI::$main_tpl
protected

◆ $mep_log

ilObjMediaPoolGUI::$mep_log
protected

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

Referenced by performBulkUpload().

◆ $output_prepared

ilObjMediaPoolGUI::$output_prepared

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

◆ $tabs

◆ $upload

ilObjMediaPoolGUI::$upload
protected

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

Referenced by performBulkUpload().


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