ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

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
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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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)
 
 toggleExplorerNodeState ()
 Toggle explorer node. More...
 
 showMedia ()
 show media object More...
 
 bulkUpload ()
 Bulk upload. More...
 
 editTitlesAndDescriptions ()
 Edit titles and descriptions. More...
 
 saveTitlesAndDescriptions ()
 Save titles and descriptions. More...
 
 returnFromItem ()
 Return from item editing. 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...
 
 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...
 
 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
 
 $mep_item_id = 0
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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

References $_GET, $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilLoggerFactory\getLogger(), and help().

67  {
68  global $DIC;
69 
70  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
71 
72  $this->tabs = $DIC->tabs();
73  $this->error = $DIC["ilErr"];
74  $this->locator = $DIC["ilLocator"];
75  $this->help = $DIC["ilHelp"];
76 
77  $this->main_tpl = $DIC->ui()->mainTemplate();
78 
79  $this->upload = $DIC->upload();
80 
81  $this->mep_log = ilLoggerFactory::getLogger("mep");
82  $this->mep_item_id = (int) $_GET["mepitem_id"];
83  }
$_GET["client_id"]
help()
Definition: help.php:2
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
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 1691 of file class.ilObjMediaPoolGUI.php.

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

1692  {
1693  global $DIC;
1694 
1695  $ilAccess = $DIC->access();
1696  $ilErr = $DIC["ilErr"];
1697  $lng = $DIC->language();
1698 
1699  $targets = explode('_', $a_target);
1700  if (count((array) $targets) > 1) {
1701  $ref_id = $targets[0];
1702  $subitem_id = $targets[1];
1703  } else {
1704  $ref_id = $targets[0];
1705  }
1706 
1707  if ($ilAccess->checkAccess("read", "", $ref_id)) {
1708  $_GET["baseClass"] = "ilMediaPoolPresentationGUI";
1709  $_GET["ref_id"] = $ref_id;
1710  $_GET['mepitem_id'] = $subitem_id;
1711  include("ilias.php");
1712  exit;
1713  } elseif ($ilAccess->checkAccess("visible", "", $ref_id)) {
1714  $_GET["baseClass"] = "ilMediaPoolPresentationGUI";
1715  $_GET["ref_id"] = $ref_id;
1716  $_GET["cmd"] = "infoScreen";
1717  include("ilias.php");
1718  exit;
1719  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1720  ilUtil::sendFailure(sprintf(
1721  $lng->txt("msg_no_perm_read_item"),
1723  ), true);
1725  }
1726 
1727  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1728  }
exit
Definition: login.php:29
const ROOT_FOLDER_ID
Definition: constants.php:30
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
global $DIC
Definition: goto.php:24
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjMediaPoolGUI::addLocatorItems ( )

add locator items for media pool

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

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

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

◆ afterConstructor()

ilObjMediaPoolGUI::afterConstructor ( )
protected

Initialisation.

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

References ilObjectGUI\$lng.

91  {
92  $lng = $this->lng;
93 
94  $lng->loadLanguageModule("mep");
95 
96  if ($this->ctrl->getCmd() == "explorer") {
97  $this->ctrl->saveParameter($this, array("ref_id"));
98  } else {
99  $this->ctrl->saveParameter($this, array("ref_id", "mepitem_id"));
100  }
101  $this->ctrl->saveParameter($this, array("mep_mode"));
102 
103  $lng->loadLanguageModule("content");
104  }

◆ afterSave()

ilObjMediaPoolGUI::afterSave ( ilObject  $newObj)

save object

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

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

460  {
461  // always send a message
462  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
463 
464  //ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
465  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=" . $newObj->getRefId() . "&cmd=listMedia");
466  }
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 645 of file class.ilObjMediaPoolGUI.php.

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

Referenced by applyFilter(), and resetFilter().

646  {
647  $tpl = $this->tpl;
648  $ilTabs = $this->tabs;
649  $ilCtrl = $this->ctrl;
651 
652  $ilCtrl->setParameter($this, "mep_mode", "allMedia");
653 
654  $this->checkPermission("read");
655  $ilTabs->setTabActive("content");
656  $this->setContentSubTabs("mep_all_mobs");
657 
658 
659  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
660  $mep_table_gui = new ilMediaPoolTableGUI(
661  $this,
662  "allMedia",
663  $this->object,
664  "mepitem_id",
666  true
667  );
668 
669 
670  if (isset($_GET['force_filter']) and $_GET['force_filter']) {
671  $_POST['title'] = ilMediaPoolItem::lookupTitle((int) $_GET['force_filter']);
672 
673  include_once("./Services/Table/classes/class.ilTablePropertiesStorage.php");
674  $tprop = new ilTablePropertiesStorage();
675  $tprop->storeProperty(
676  $mep_table_gui->getId(),
677  $ilUser->getId(),
678  'filter',
679  1
680  );
681  $mep_table_gui->resetFilter();
682  $mep_table_gui->resetOffset();
683  $mep_table_gui->writeFilterToSession();
684 
685  // Read again
686  $mep_table_gui = new ilMediaPoolTableGUI(
687  $this,
688  "allMedia",
689  $this->object,
690  "mepitem_id",
692  true
693  );
694  }
695 
696  $tpl->setContent($mep_table_gui->getHTML());
697  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
Saves (mostly asynchronously) user properties of tables (e.g.
setContentSubTabs($a_active)
Set sub tabs for content tab.
static lookupTitle($a_id)
Lookup title.
$ilUser
Definition: imgupload.php:18
$_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 702 of file class.ilObjMediaPoolGUI.php.

References allMedia(), and ilMediaPoolTableGUI\IL_MEP_EDIT.

703  {
704  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
705  $mtab = new ilMediaPoolTableGUI(
706  $this,
707  "allMedia",
708  $this->object,
709  "mepitem_id",
711  true
712  );
713  $mtab->writeFilterToSession();
714  $mtab->resetOffset();
715  $this->allMedia();
716  }
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 1987 of file class.ilObjMediaPoolGUI.php.

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

1988  {
1989  $this->checkPermission("write");
1990 
1992 
1993  $form = $this->initBulkUploadForm();
1994  $main_tpl->setContent($form->getHTML());
1995  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
initBulkUploadForm()
Init bulk upload form.
+ Here is the call graph for this function:

◆ cancelFolderUpdate()

ilObjMediaPoolGUI::cancelFolderUpdate ( )

Cancel save.

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

References $_GET, and ilObjectGUI\$ctrl.

1261  {
1262  $ilCtrl = $this->ctrl;
1263  $ilCtrl->setParameter(
1264  $this,
1265  "mepitem_id",
1266  $this->object->getTree()->getParentId($_GET["mepitem_id"])
1267  );
1268  $ilCtrl->redirect($this, "listMedia");
1269  }
$_GET["client_id"]

◆ cancelRemove()

ilObjMediaPoolGUI::cancelRemove ( )

cancel deletion of media objects/folders

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

References $_GET.

1037  {
1038  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1039  }
$_GET["client_id"]

◆ cancelSave()

ilObjMediaPoolGUI::cancelSave ( )

Cancel save.

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

References ilObjectGUI\$ctrl.

1275  {
1276  $ilCtrl = $this->ctrl;
1277  $ilCtrl->redirect($this, "listMedia");
1278  }

◆ confirmRemove()

ilObjMediaPoolGUI::confirmRemove ( )

confirm remove of mobs

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

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

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

1063  {
1064  $ilUser = $this->user;
1065  $ilAccess = $this->access;
1066 
1067  $this->checkPermission("write");
1068 
1069  if (!isset($_POST["id"])) {
1070  ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1071  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1072  }
1073 
1074  foreach ($_POST["id"] as $obj_id) {
1076  if ($type == "fold") {
1077  ilUtil::sendFailure($this->lng->txt("cont_cant_copy_folders"), true);
1078  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1079  }
1080  }
1081  foreach ($_POST["id"] as $obj_id) {
1082  $fid = ilMediaPoolItem::lookupForeignId($obj_id);
1084  if ($type == "mob") {
1085  $ilUser->addObjectToClipboard($fid, "mob", "");
1086  }
1087  if ($type == "pg") {
1088  $ilUser->addObjectToClipboard($obj_id, "incl", "");
1089  }
1090  }
1091  ilUtil::sendSuccess($this->lng->txt("copied_to_clipboard"), true);
1092  $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
1093  }
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.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$ilUser
Definition: imgupload.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ createFolderForm()

ilObjMediaPoolGUI::createFolderForm ( )

create folder form

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

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

1133  {
1134  $ilAccess = $this->access;
1135  $tpl = $this->tpl;
1136 
1137  $this->checkPermission("write");
1138 
1139  $this->initFolderForm("create");
1140  $tpl->setContent($this->form->getHTML());
1141  }
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 1832 of file class.ilObjMediaPoolGUI.php.

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

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

444  {
445  $this->ctrl->redirectByClass("ilobjmediaobjectgui", "create");
446  }

◆ createMediaPoolPage()

ilObjMediaPoolGUI::createMediaPoolPage ( )

Create new content snippet.

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

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

1288  {
1289  $tpl = $this->tpl;
1290 
1291  $this->checkPermission("write");
1292 
1293  $this->initMediaPoolPageForm("create");
1294  $tpl->setContent($this->form->getHTML());
1295  }
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 518 of file class.ilObjMediaPoolGUI.php.

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

519  {
520  $tpl = $this->tpl;
521  $ilTabs = $this->tabs_gui;
523 
524  $this->setSettingsSubTabs("settings");
525 
526  if (!$this->checkPermissionBool("write")) {
527  $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
528  }
529 
530  $ilTabs->activateTab("settings");
531 
532  $form = $this->initEditForm();
533  $values = $this->getEditFormValues();
534  if ($values) {
535  $form->setValuesByArray($values, true);
536  }
537 
538  $this->addExternalEditFormCustom($form);
539 
540  $tpl->setContent($form->getHTML());
541  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
setSettingsSubTabs($a_active)
Set setting sub tabs.
addExternalEditFormCustom(ilPropertyFormGUI $a_form)
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 1149 of file class.ilObjMediaPoolGUI.php.

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

1150  {
1151  $tpl = $this->tpl;
1152 
1153  $this->checkPermission("write");
1154 
1155  $this->initFolderForm();
1156  $this->getFolderValues();
1157  $tpl->setContent($this->form->getHTML());
1158  }
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 1303 of file class.ilObjMediaPoolGUI.php.

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

1304  {
1305  $tpl = $this->tpl;
1306  $ilTabs = $this->tabs;
1307 
1308  $this->checkPermission("write");
1309 
1310  $ilTabs->clearTargets();
1311 
1312  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1313  $mep_page_gui = new ilMediaPoolPageGUI($_GET["mepitem_id"], $_GET["old_nr"]);
1314  $mep_page_gui->getTabs();
1315 
1316  $this->setMediaPoolPageTabs();
1317 
1318  $this->initMediaPoolPageForm("edit");
1319  $this->getMediaPoolPageValues();
1320  $tpl->setContent($this->form->getHTML());
1321  }
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 2120 of file class.ilObjMediaPoolGUI.php.

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

2121  {
2122  $ctrl = $this->ctrl;
2123  $lng = $this->lng;
2124 
2125  $this->checkPermission("write");
2126  $ctrl->saveParameter($this, "mep_hash");
2127 
2129 
2130  include_once("./Services/MediaObjects/classes/class.ilMediaItem.php");
2131  $media_items = ilMediaItem::getMediaItemsForUploadHash($_GET["mep_hash"]);
2132 
2133  include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
2134 
2135  $tb = new ilToolbarGUI();
2136  $tb->setFormAction($ctrl->getFormAction($this));
2137  $tb->addFormButton($lng->txt("save"), "saveTitlesAndDescriptions");
2138  $tb->setOpenFormTag(true);
2139  $tb->setCloseFormTag(false);
2140  $tb->setId("tb_top");
2141 
2142  $html = $tb->getHTML();
2143  foreach ($media_items as $mi) {
2144  $acc = new ilAccordionGUI();
2145  $acc->setBehaviour(ilAccordionGUI::ALL_CLOSED);
2146  $acc->setId("acc_" . $mi["mob_id"]);
2147 
2148  $mob = new ilObjMediaObject($mi["mob_id"]);
2149  $form = $this->initMediaBulkForm($mi["mob_id"], $mob->getTitle());
2150  $acc->addItem($mob->getTitle(), $form->getHTML());
2151 
2152  $html .= $acc->getHTML();
2153  }
2154 
2155  $html .= $tb->getHTML();
2156  $tb->setOpenFormTag(false);
2157  $tb->setCloseFormTag(true);
2158  $tb->setId("tb_bottom");
2159 
2160  $main_tpl->setContent($html);
2161  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
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.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjMediaPoolGUI::executeCommand ( )

execute command

Returns
bool|void
Exceptions
ilCtrlException

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

References $_GET, $_POST, ilObjectGUI\$access, ilObjectGUI\$ctrl, ilObjectGUI\$lng, $ret, $tabs, ilObjectGUI\$tpl, ilObjectGUI\$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(), setSettingsSubTabs(), and ilImportDirectoryFactory\TYPE_MOB.

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

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

1969  {
1970  $ot = ilObjectTranslation::getInstance($this->object->getId());
1971  $opt = "";
1972  if ($ot->getContentActivated()) {
1973  $format = explode("_", $_POST["format"]);
1974  $opt = ilUtil::stripSlashes($format[1]);
1975  }
1976 
1977  $this->object->exportXML($opt);
1978  }
$format
Definition: metadata.php:218
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 544 of file class.ilObjMediaPoolGUI.php.

545  {
546  if ($this->object->getDefaultWidth() > 0) {
547  $a_values["default_width"] = $this->object->getDefaultWidth();
548  }
549  if ($this->object->getDefaultHeight() > 0) {
550  $a_values["default_height"] = $this->object->getDefaultHeight();
551  }
552  }

◆ getFolderValues()

ilObjMediaPoolGUI::getFolderValues ( )

Get current values for folder from.

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

References $_GET, and ilMediaPoolItem\lookupTitle().

Referenced by editFolder().

1164  {
1165  $values = array();
1166 
1167  $values["title"] = ilMediaPoolItem::lookupTitle($_GET["mepitem_id"]);
1168 
1169  $this->form->setValuesByArray($values);
1170  }
$_GET["client_id"]
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 1426 of file class.ilObjMediaPoolGUI.php.

References $_GET, and ilMediaPoolItem\lookupTitle().

Referenced by editMediaPoolPage().

1427  {
1428  $values = array();
1429 
1430  include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1431  $values["title"] = ilMediaPoolItem::lookupTitle($_GET["mepitem_id"]);
1432 
1433  $this->form->setValuesByArray($values);
1434  }
$_GET["client_id"]
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 749 of file class.ilObjMediaPoolGUI.php.

References $_GET.

Referenced by executeCommand().

750  {
751  if ($_GET["mepitem_id"] == "") {
752  return "";
753  }
754  $par_id = $this->object->getPoolTree()->getParentId($_GET["mepitem_id"]);
755  if ($par_id != $this->object->getPoolTree()->getRootId()) {
756  return $par_id;
757  } else {
758  return "";
759  }
760  }
$_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 1936 of file class.ilObjMediaPoolGUI.php.

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

Referenced by ilMediaPoolTableGUI\getHTML().

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

Referenced by executeCommand().

741  {
742  $this->tpl->loadStandardTemplate();
743  }
+ Here is the caller graph for this function:

◆ getType()

ilObjMediaPoolGUI::getType ( )
final

Get type.

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

110  {
111  return "mep";
112  }

◆ infoScreen()

ilObjMediaPoolGUI::infoScreen ( )

show information screen

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

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

Referenced by executeCommand(), and infoScreenObject().

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

References infoScreen().

1736  {
1737  $this->ctrl->setCmd("showSummary");
1738  $this->ctrl->setCmdClass("ilinfoscreengui");
1739  $this->infoScreen();
1740  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initBulkUploadForm()

ilObjMediaPoolGUI::initBulkUploadForm ( )

Init bulk upload form.

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

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

Referenced by bulkUpload(), and performBulkUpload().

2001  {
2002  $ctrl = $this->ctrl;
2003  $lng = $this->lng;
2004 
2005  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2006  $form = new ilPropertyFormGUI();
2007 
2008  $form->setFormAction($ctrl->getFormAction($this));
2009  $form->setPreventDoubleSubmission(false);
2010 
2011  $item = new ilFileStandardDropzoneInputGUI(
2012  'cancel',
2013  $lng->txt("mep_media_files"),
2014  'media_files'
2015  );
2016  $item->setUploadUrl($ctrl->getLinkTarget($this, "performBulkUpload", "", true, true));
2017  $item->setMaxFiles(20);
2018  $form->addItem($item);
2019 
2020  $form->addCommandButton("performBulkUpload", $lng->txt("upload"));
2021 
2022  $form->setTitle($lng->txt("mep_bulk_upload"));
2023 
2024  return $form;
2025  }
This class represents a property form user interface.
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 448 of file class.ilObjMediaPoolGUI.php.

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

449  {
450  $forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type),
451  self::CFORM_IMPORT => $this->initImportForm($a_new_type));
452 
453  return $forms;
454  }
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 468 of file class.ilObjMediaPoolGUI.php.

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

469  {
470  $obj_service = $this->object_service;
471 
472  // default width
473  $ni = new ilNumberInputGUI($this->lng->txt("mep_default_width"), "default_width");
474  $ni->setMinValue(0);
475  $ni->setSuffix("px");
476  $ni->setMaxLength(5);
477  $ni->setSize(5);
478  $a_form->addItem($ni);
479 
480  // default height
481  $ni = new ilNumberInputGUI($this->lng->txt("mep_default_height"), "default_height");
482  $ni->setSuffix("px");
483  $ni->setMinValue(0);
484  $ni->setMaxLength(5);
485  $ni->setSize(5);
486  $ni->setInfo($this->lng->txt("mep_default_width_height_info"));
487  $a_form->addItem($ni);
488 
489  // presentation
490  $pres = new ilFormSectionHeaderGUI();
491  $pres->setTitle($this->lng->txt('obj_presentation'));
492  $a_form->addItem($pres);
493 
494  // tile image
495  $obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
496 
497  // additional features
498  $feat = new ilFormSectionHeaderGUI();
499  $feat->setTitle($this->lng->txt('obj_features'));
500  $a_form->addItem($feat);
501 
502  include_once './Services/Container/classes/class.ilContainer.php';
503  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
505  $this->object->getId(),
506  $a_form,
507  array(
509  )
510  );
511  }
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 1229 of file class.ilObjMediaPoolGUI.php.

References ilObjectGUI\$ctrl, and ilObjectGUI\$lng.

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

1230  {
1231  $lng = $this->lng;
1232  $ilCtrl = $this->ctrl;
1233 
1234  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1235  $this->form = new ilPropertyFormGUI();
1236 
1237  // desc
1238  $ti = new ilTextInputGUI($lng->txt("title"), "title");
1239  $ti->setMaxLength(128);
1240  $ti->setRequired(true);
1241  $this->form->addItem($ti);
1242 
1243  // save and cancel commands
1244  if ($a_mode == "create") {
1245  $this->form->addCommandButton("saveFolder", $lng->txt("save"));
1246  $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
1247  $this->form->setTitle($lng->txt("mep_new_folder"));
1248  } else {
1249  $this->form->addCommandButton("updateFolder", $lng->txt("save"));
1250  $this->form->addCommandButton("cancelFolderUpdate", $lng->txt("cancel"));
1251  $this->form->setTitle($lng->txt("mep_edit_folder"));
1252  }
1253 
1254  $this->form->setFormAction($ilCtrl->getFormAction($this));
1255  }
This class represents a property form user interface.
+ Here is the caller graph for this function:

◆ initMediaBulkForm()

ilObjMediaPoolGUI::initMediaBulkForm (   $a_id,
  $a_title 
)

Init media bulk form.

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

References ilObjectGUI\$lng.

Referenced by editTitlesAndDescriptions(), and saveTitlesAndDescriptions().

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

References ilObjectGUI\$ctrl, and ilObjectGUI\$lng.

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

1397  {
1398  $lng = $this->lng;
1399  $ilCtrl = $this->ctrl;
1400 
1401  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1402  $this->form = new ilPropertyFormGUI();
1403 
1404  // title
1405  $ti = new ilTextInputGUI($lng->txt("title"), "title");
1406  $ti->setMaxLength(128);
1407  $ti->setRequired(true);
1408  $this->form->addItem($ti);
1409 
1410  // save and cancel commands
1411  if ($a_mode == "create") {
1412  $this->form->addCommandButton("saveMediaPoolPage", $lng->txt("save"));
1413  $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
1414  $this->form->setTitle($lng->txt("mep_new_content_snippet"));
1415  } else {
1416  $this->form->addCommandButton("updateMediaPoolPage", $lng->txt("save"));
1417  $this->form->setTitle($lng->txt("mep_edit_content_snippet"));
1418  }
1419 
1420  $this->form->setFormAction($ilCtrl->getFormAction($this));
1421  }
This class represents a property form user interface.
+ Here is the caller graph for this function:

◆ insertFromClipboard()

ilObjMediaPoolGUI::insertFromClipboard ( )

insert media object from clipboard

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

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

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

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

Referenced by returnFromItem().

580  {
581  $ilAccess = $this->access;
582  $tpl = $this->tpl;
583  $ilTabs = $this->tabs;
584  $ilCtrl = $this->ctrl;
585  $ilToolbar = $this->toolbar;
586  $lng = $this->lng;
587 
588  $ilCtrl->setParameter($this, "mep_mode", "listMedia");
589 
590  $this->checkPermission("read");
591 
592  $ilTabs->setTabActive("content");
593  $this->setContentSubTabs("content");
594 
595  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
596  $ilToolbar->addButton(
597  $lng->txt("mep_create_mob"),
598  $ilCtrl->getLinkTarget($this, "createMediaObject")
599  );
600 
601  $mset = new ilSetting("mobs");
602  if ($mset->get("mep_activate_pages")) {
603  $ilToolbar->addButton(
604  $lng->txt("mep_create_content_snippet"),
605  $ilCtrl->getLinkTarget($this, "createMediaPoolPage")
606  );
607  }
608 
609  $ilToolbar->addButton(
610  $lng->txt("mep_create_folder"),
611  $ilCtrl->getLinkTarget($this, "createFolderForm")
612  );
613 
614  $upload_factory = new ilImportDirectoryFactory();
615  $media_upload = $upload_factory->getInstanceForComponent(ilImportDirectoryFactory::TYPE_MOB);
616  if ($media_upload->exists() && ilMainMenuGUI::_checkAdministrationPermission()) {
617  $ilToolbar->addButton(
618  $lng->txt("mep_create_from_upload_dir"),
619  $ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles")
620  );
621  }
622 
623  $ilToolbar->addButton(
624  $lng->txt("mep_bulk_upload"),
625  $ilCtrl->getLinkTarget($this, "bulkUpload")
626  );
627  }
628 
629  $mep_table_gui = new ilMediaPoolTableGUI($this, "listMedia", $this->object, "mepitem_id");
630  $tpl->setContent($mep_table_gui->getHTML());
631  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
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:
+ Here is the caller graph for this function:

◆ openClipboard()

ilObjMediaPoolGUI::openClipboard ( )

paste from clipboard

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

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

940  {
941  $ilCtrl = $this->ctrl;
942  $ilAccess = $this->access;
943 
944  $this->checkPermission("write");
945 
946  $ilCtrl->setParameterByClass(
947  "ileditclipboardgui",
948  "returnCommand",
949  rawurlencode($ilCtrl->getLinkTarget(
950  $this,
951  "insertFromClipboard",
952  "",
953  false,
954  false
955  ))
956  );
957  $ilCtrl->redirectByClass("ilEditClipboardGUI", "getObject");
958  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
+ Here is the call graph for this function:

◆ performBulkUpload()

ilObjMediaPoolGUI::performBulkUpload ( )

Save bulk upload form.

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

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

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

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

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

References allMedia(), and ilMediaPoolTableGUI\IL_MEP_EDIT.

722  {
723  include_once("./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
724  $mtab = new ilMediaPoolTableGUI(
725  $this,
726  "allMedia",
727  $this->object,
728  "mepitem_id",
730  true
731  );
732  $mtab->resetFilter();
733  $mtab->resetOffset();
734  $this->allMedia();
735  }
allMedia()
list all objects
TableGUI class for recent changes in wiki.
+ Here is the call graph for this function:

◆ returnFromItem()

ilObjMediaPoolGUI::returnFromItem ( )
protected

Return from item editing.

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

References ilObjectGUI\$ctrl, ilObjectGUI\$tree, $type, listMedia(), and ilMediaPoolItem\lookupType().

2220  : void
2221  {
2222  $ctrl = $this->ctrl;
2223 
2224  $type = ilMediaPoolItem::lookupType($this->mep_item_id);
2225  if ($type !== "fold") {
2226  $tree = $this->object->getTree();
2227  $fold_id = $tree->getParentId($this->mep_item_id);
2228  if ($fold_id > 0) {
2229  $ctrl->setParameter($this, "mepitem_id", $fold_id);
2230  $ctrl->redirect($this, "listMedia");
2231  }
2232  }
2233  $this->listMedia();
2234  }
static lookupType($a_id)
Lookup type.
$type
listMedia()
list media objects
+ Here is the call graph for this function:

◆ saveFolder()

ilObjMediaPoolGUI::saveFolder ( )

Save folder form.

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

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

1176  {
1177  $tpl = $this->tpl;
1178  $lng = $this->lng;
1179  $ilCtrl = $this->ctrl;
1180 
1181  $this->checkPermission("write");
1182 
1183  $this->initFolderForm("create");
1184  if ($this->form->checkInput()) {
1185  if ($this->object->createFolder($_POST["title"], (int) $_GET["mepitem_id"])) {
1186  ilUtil::sendSuccess($lng->txt("mep_folder_created"), true);
1187  }
1188  $ilCtrl->redirect($this, "listMedia");
1189  }
1190 
1191  $this->form->setValuesByPost();
1192  $tpl->setContent($this->form->getHtml());
1193  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
initFolderForm($a_mode="edit")
Init folder form.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveMediaPoolPage()

ilObjMediaPoolGUI::saveMediaPoolPage ( )

Save media pool page.

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

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

1327  {
1328  $tpl = $this->tpl;
1329  $lng = $this->lng;
1330  $ilCtrl = $this->ctrl;
1331 
1332  $this->checkPermission("write");
1333 
1334  $this->initMediaPoolPageForm("create");
1335  if ($this->form->checkInput()) {
1336  // create media pool item
1337  include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1338  $item = new ilMediaPoolItem();
1339  $item->setTitle($_POST["title"]);
1340  $item->setType("pg");
1341  $item->create();
1342 
1343  if ($item->getId() > 0) {
1344  // put in tree
1345  $tree = $this->object->getTree();
1346  $parent = $_GET["mepitem_id"] > 0
1347  ? $_GET["mepitem_id"]
1348  : $tree->getRootId();
1349  $this->object->insertInTree($item->getId(), $parent);
1350 
1351  // create page
1352  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1353  $page = new ilMediaPoolPage();
1354  $page->setId($item->getId());
1355  $page->setParentId($this->object->getId());
1356  $page->create();
1357 
1358  $ilCtrl->setParameterByClass("ilmediapoolpagegui", "mepitem_id", $item->getId());
1359  $ilCtrl->redirectByClass("ilmediapoolpagegui", "edit");
1360  }
1361  $ilCtrl->redirect($this, "listMedia");
1362  }
1363 
1364  $this->form->setValuesByPost();
1365  $tpl->setContent($this->form->getHtml());
1366  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
Class ilMediaPoolPage.
initMediaPoolPageForm($a_mode="edit")
Init page form.
Media Pool Item.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveTitlesAndDescriptions()

ilObjMediaPoolGUI::saveTitlesAndDescriptions ( )
protected

Save titles and descriptions.

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

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

2191  {
2192  $lng = $this->lng;
2193  $ctrl = $this->ctrl;
2194 
2195  $this->checkPermission("write");
2196  //var_dump(_$POST); exit;
2197 
2198  $media_items = ilMediaItem::getMediaItemsForUploadHash($_GET["mep_hash"]);
2199  include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
2200 
2201  foreach ($media_items as $mi) {
2202  $mob = new ilObjMediaObject($mi["mob_id"]);
2203  $form = $this->initMediaBulkForm($mi["mob_id"], $mob->getTitle());
2204  $form->checkInput();
2205  $title = $form->getInput("title_" . $mi["mob_id"]);
2206  $desc = $form->getInput("description_" . $mi["mob_id"]);
2207  if (trim($title) != "") {
2208  $mob->setTitle($title);
2209  }
2210  $mob->setDescription($desc);
2211  $mob->update();
2212  }
2213  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
2214  $ctrl->redirect($this, "listMedia");
2215  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
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 1783 of file class.ilObjMediaPoolGUI.php.

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

1784  {
1785  $tpl = $this->tpl;
1786  $ilTabs = $this->tabs;
1787  $lng = $this->lng;
1788  $ilCtrl = $this->ctrl;
1789  $ilToolbar = $this->toolbar;
1790 
1791  if (!$a_files) {
1792  $a_files = $_POST["file"];
1793  }
1794 
1795  $ilTabs->clearTargets();
1796  $ilTabs->setBackTarget(
1797  $lng->txt("back"),
1798  $ilCtrl->getLinkTarget($this, "listMedia")
1799  );
1800 
1801  $this->checkPermission("write");
1802 
1804 
1805  // action type
1806  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1807  $options = array(
1808  "rename" => $lng->txt("mep_up_dir_move"),
1809  "copy" => $lng->txt("mep_up_dir_copy"),
1810  );
1811  $si = new ilSelectInputGUI("", "action");
1812  $si->setOptions($options);
1813  $ilToolbar->addInputItem($si);
1814  $ilToolbar->setCloseFormTag(false);
1815  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1816  $ilToolbar->setFormName("mep_up_form");
1817 
1818  include_once("./Modules/MediaPool/classes/class.ilUploadDirFilesTableGUI.php");
1819  $tab = new ilUploadDirFilesTableGUI(
1820  $this,
1821  "selectUploadDirFiles",
1822  $a_files
1823  );
1824  $tab->setFormName("mep_up_form");
1825  $tpl->setContent($tab->getHTML());
1826  }
1827  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
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 1534 of file class.ilObjMediaPoolGUI.php.

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

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

1535  {
1536  $ilAccess = $this->access;
1537  $ilTabs = $this->tabs;
1538  $ilCtrl = $this->ctrl;
1539 
1540  $ilTabs->addSubTab("content", $this->lng->txt("objs_fold"), $this->ctrl->getLinkTarget($this, ""));
1541 
1542  $ilCtrl->setParameter($this, "mepitem_id", "");
1543  $ilTabs->addSubTab("mep_all_mobs", $this->lng->txt("mep_all_mobs"), $this->ctrl->getLinkTarget($this, "allMedia"));
1544  $ilCtrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
1545 
1546  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
1547  $ilTabs->addSubtab(
1548  "srt_files",
1549  $this->lng->txt("mep_media_subtitles"),
1550  $ilCtrl->getLinkTargetByClass("ilmobmultisrtuploadgui", "")
1551  );
1552  }
1553 
1554  $ilTabs->activateSubTab($a_active);
1555  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ setMediaPoolPageTabs()

ilObjMediaPoolGUI::setMediaPoolPageTabs ( )

Set media pool page tabs.

Parameters

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

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

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

1443  {
1444  $ilTabs = $this->tabs;
1445  $ilCtrl = $this->ctrl;
1446  $lng = $this->lng;
1447 
1448  $ilTabs->addTarget(
1449  "cont_usage",
1450  $ilCtrl->getLinkTarget($this, "showMediaPoolPageUsages"),
1451  array("showMediaPoolPageUsages", "showAllMediaPoolPageUsages"),
1452  get_class($this)
1453  );
1454  $ilTabs->addTarget(
1455  "settings",
1456  $ilCtrl->getLinkTarget($this, "editMediaPoolPage"),
1457  "editMediaPoolPage",
1458  get_class($this)
1459  );
1460  $ilCtrl->setParameter($this, "mepitem_id", $this->object->getPoolTree()->getParentId($_GET["mepitem_id"]));
1461  $ilTabs->setBackTarget($lng->txt("mep_folder"), $ilCtrl->getLinkTarget($this, "listMedia"));
1462  $ilCtrl->setParameter($this, "mepitem_id", $_GET["mepitem_id"]);
1463  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjMediaPoolGUI::setSettingsSubTabs (   $a_active)

Set setting sub tabs.

Parameters

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

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

Referenced by edit(), and executeCommand().

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

◆ setTabs()

ilObjMediaPoolGUI::setTabs ( )

Set tabs.

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

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

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

◆ showAllMediaPoolPageUsages()

ilObjMediaPoolGUI::showAllMediaPoolPageUsages ( )

List usages of the contnet snippet.

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

References showMediaPoolPageUsages().

1469  {
1470  $this->showMediaPoolPageUsages(true);
1471  }
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 878 of file class.ilObjMediaPoolGUI.php.

References showMedia().

879  {
880  $this->showMedia();
881  }
showMedia()
show media object
+ Here is the call graph for this function:

◆ showMedia()

ilObjMediaPoolGUI::showMedia ( )
protected

show media object

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

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

Referenced by showFullscreen(), and showPreview().

766  {
767  $this->checkPermission("read");
768 
769  $item = new ilMediaPoolItem((int) $_GET["mepitem_id"]);
770  $mob_id = $item->getForeignId();
771 
772  $this->tpl = new ilGlobalTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
773  include_once("Services/Style/Content/classes/class.ilObjStyleSheet.php");
774  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
775  $this->tpl->setVariable(
776  "LOCATION_CONTENT_STYLESHEET",
778  );
779 
780 
781  require_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
782  require_once("./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
784  $media_obj = new ilObjMediaObject((int) $mob_id);
785 
786 
787  $this->tpl->setVariable("TITLE", " - " . $media_obj->getTitle());
788 
789  $xml = "<dummy>";
790  // todo: we get always the first alias now (problem if mob is used multiple
791  // times in page)
792  $xml .= $media_obj->getXML(IL_MODE_ALIAS);
793  $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
794  $xml .= $link_xml;
795  $xml .= "</dummy>";
796 
797  $xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
798  $args = array( '/_xml' => $xml, '/_xsl' => $xsl );
799  $xh = xslt_create();
800 
801  $wb_path = ilUtil::getWebspaceDir("output") . "/";
802 
803  $mode = ($_GET["cmd"] != "showPreview")
804  ? "fullscreen"
805  : "media";
806  $enlarge_path = ilUtil::getImagePath("enlarge.svg", false, "output");
807  $fullscreen_link =
808  $this->ctrl->getLinkTarget($this, "showFullscreen", "", false, false);
809  $params = array('mode' => $mode, 'enlarge_path' => $enlarge_path,
810  'link_params' => "ref_id=" . $_GET["ref_id"],'fullscreen_link' => $fullscreen_link,
811  'enable_html_mob' => ilObjMediaObject::isTypeAllowed("html") ? "y" : "n",
812  'ref_id' => $_GET["ref_id"], 'pg_frame' => $pg_frame, 'webspace_path' => $wb_path);
813  $output = xslt_process($xh, "arg:/_xml", "arg:/_xsl", null, $args, $params);
814  echo xslt_error($xh);
815  xslt_free($xh);
816  // unmask user html
817  $this->tpl->setVariable("MEDIA_CONTENT", $output);
818  }
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
xslt_create()
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
special template class to simplify handling of ITX/PEAR
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.
static isTypeAllowed($a_type)
Is type allowed.
xslt_error(&$proc)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$xml
Definition: metadata.php:332
Class ilObjMediaObject.
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 1477 of file class.ilObjMediaPoolGUI.php.

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

Referenced by showAllMediaPoolPageUsages().

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

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

Referenced by showPreview().

827  {
828  $tpl = $this->tpl;
829 
830  //$tpl = new \ilGlobalPageTemplate($DIC->globalScreen(), $DIC->ui(), $DIC->http());
831  $tpl = new ilGlobalTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
832 
836 
837  // get page object
838  $page_gui = new ilMediaPoolPageGUI((int) $_GET["mepitem_id"]);
839  $page_gui->setTemplate($tpl);
840 
841  $page_gui->setTemplateOutput(false);
842  $page_gui->setHeader("");
843  $ret = $page_gui->showPage(true);
844 
845  //$tpl->setBodyClass("ilMediaPoolPagePreviewBody");
846  $tpl->setVariable("MEDIA_CONTENT", "<div>" . $ret . "</div>");
847 
848 
849  $tpl->printToStdout();
850  exit;
851  }
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
exit
Definition: login.php:29
special template class to simplify handling of ITX/PEAR
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
static getSyntaxStylePath()
get syntax style path
$ret
Definition: parser.php:6
Class ilMediaPoolPage GUI class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPreview()

ilObjMediaPoolGUI::showPreview ( )

Show content snippet.

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

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

858  {
859  $this->checkPermission("read");
860 
861  $item = new ilMediaPoolItem((int) $_GET["mepitem_id"]);
862 
863  switch ($item->getType()) {
864  case "mob":
865  $this->showMedia();
866  break;
867 
868  case "pg":
869  $this->showPage();
870  break;
871  }
872  }
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:

◆ toggleExplorerNodeState()

ilObjMediaPoolGUI::toggleExplorerNodeState ( )
protected

Toggle explorer node.

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

636  : void
637  {
638  $exp = new ilMediaPoolExplorerGUI($this, "listMedia", $this->object);
639  $exp->toggleExplorerNodeState();
640  }
Media pool explorer GUI class.

◆ updateCustom()

ilObjMediaPoolGUI::updateCustom ( ilPropertyFormGUI  $a_form)
protected

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

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

555  {
556  $obj_service = $this->object_service;
557 
558  $this->object->setDefaultWidth($a_form->getInput("default_width"));
559  $this->object->setDefaultHeight($a_form->getInput("default_height"));
560 
561 
562  // additional features
563  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
565  $this->object->getId(),
566  $a_form,
567  array(
569  )
570  );
571 
572  // tile image
573  $obj_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
574  }
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 1198 of file class.ilObjMediaPoolGUI.php.

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

1199  {
1200  $lng = $this->lng;
1201  $ilCtrl = $this->ctrl;
1202  $tpl = $this->tpl;
1203 
1204  $this->checkPermission("write");
1205 
1206  $this->initFolderForm("edit");
1207  if ($this->form->checkInput()) {
1208  $item = new ilMediaPoolItem($_GET["mepitem_id"]);
1209  $item->setTitle($_POST["title"]);
1210  $item->update();
1211  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1212  $ilCtrl->setParameter(
1213  $this,
1214  "mepitem_id",
1215  $this->object->getTree()->getParentId($_GET["mepitem_id"])
1216  );
1217  $ilCtrl->redirect($this, "listMedia");
1218  }
1219 
1220  $this->form->setValuesByPost();
1221  $tpl->setContent($this->form->getHtml());
1222  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
initFolderForm($a_mode="edit")
Init folder form.
Media Pool Item.
$_POST["username"]
+ Here is the call graph for this function:

◆ updateMediaPoolPage()

ilObjMediaPoolGUI::updateMediaPoolPage ( )

Update media pool page.

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

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

1372  {
1373  $lng = $this->lng;
1374  $ilCtrl = $this->ctrl;
1375  $tpl = $this->tpl;
1376 
1377  $this->checkPermission("write");
1378 
1379  $this->initMediaPoolPageForm("edit");
1380  if ($this->form->checkInput()) {
1381  $item = new ilMediaPoolItem($_GET["mepitem_id"]);
1382  $item->setTitle($_POST["title"]);
1383  $item->update();
1384  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1385  $ilCtrl->redirect($this, "editMediaPoolPage");
1386  }
1387 
1388  $this->form->setValuesByPost();
1389  $tpl->setContent($this->form->getHtml());
1390  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
initMediaPoolPageForm($a_mode="edit")
Init page form.
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_item_id

ilObjMediaPoolGUI::$mep_item_id = 0
protected

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

◆ $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 85 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: