ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilObjMediaPoolGUI Class Reference

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

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

Public Member Functions

 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 getType ()
 
 executeCommand ()
 
 createMediaObject ()
 
 edit ()
 
 listMedia ()
 list media objects More...
 
 allMedia ()
 list all media objects More...
 
 applyFilter ()
 Apply filter. More...
 
 resetFilter ()
 
 getTemplate ()
 Get standard template. More...
 
 getParentFolderId ()
 Get folder parent ID. More...
 
 showPage ()
 Show page. More...
 
 showPreview ()
 Show content snippet. More...
 
 showFullscreen ()
 show media 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 ()
 
 copyToClipboard ()
 copy media objects to clipboard More...
 
 createFolderForm ()
 
 editFolder ()
 
 getFolderValues ()
 Get current values for folder from. More...
 
 saveFolder ()
 Save folder form. More...
 
 updateFolder ()
 
 initFolderForm (string $a_mode="edit")
 
 cancelFolderUpdate ()
 
 cancelSave ()
 
 setContentSubTabs (string $a_active)
 Set sub tabs for content tab. More...
 
 setSettingsSubTabs (string $a_active)
 
 infoScreenObject ()
 this one is called from the info button in the repository More...
 
 infoScreen ()
 show information screen More...
 
 selectUploadDirFiles (?array $a_files=null)
 Select files from upload directory. More...
 
 export ()
 
 performBulkUpload ()
 Save bulk upload form. More...
 
 initMediaBulkForm (int $a_id, string $a_title)
 Init media bulk form. More...
 
 finishSingleUpload (int $mob_id)
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 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 (bool $mode=true)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 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 (string $a_target)
 
static getPreviewModalHTML (int $a_mpool_ref_id, ilGlobalTemplateInterface $a_tpl)
 Get preview modal html. More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

bool $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 ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 afterConstructor ()
 
 returnFromItem ()
 Return from item editing. More...
 
 afterSave (ilObject $new_object)
 
 toggleExplorerNodeState ()
 
 showMedia ()
 show media object More...
 
 getMediaPoolPageGUI ($mep_item_id, $old_nr=0)
 Get media pool page. More...
 
 addLocatorItems ()
 add locator items for media pool More...
 
 setTabs ()
 
 bulkUpload ()
 
 getBulkUploadForm ()
 
 handleUploadResult (FileUpload $upload, UploadResult $result)
 
 editTitlesAndDescriptions ()
 
 saveTitlesAndDescriptions ()
 
 move ()
 
 paste ()
 
 afterUpload ($mob_ids)
 
 afterUrlSaving (int $mob_id, string $long_desc)
 
 addMobsToPool (array $mob_ids, string $long_desc="", bool $redirect=true, bool $extract=false)
 
 afterPoolInsert (array $mob_ids)
 
 onMobUpdate (int $mob_id)
 
- 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 ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 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 More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ILIAS MediaPool InternalDomainService $domain
 
ILIAS COPage Xsl XslManager $xsl
 
FormAdapterGUI $bulk_upload_form = null
 
InternalGUIService $gui
 
ilPropertyFormGUI $form
 
string $mode
 
int $mep_item_id = 0
 
StandardGUIRequest $mep_request
 
ilTabsGUI $tabs
 
ilHelpGUI $help
 
ilGlobalTemplateInterface $main_tpl
 
FileUpload $upload
 
ilLogger $mep_log
 
ilDBInterface $db
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = []
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, ilObjectGUI\$object, ILIAS\GlobalScreen\Provider\__construct(), ilLoggerFactory\getLogger(), ILIAS\Repository\help(), ILIAS\Repository\locator(), ILIAS\Repository\tabs(), and ILIAS\Repository\upload().

64  {
65  global $DIC;
66 
67  $this->mep_request = $DIC->mediaPool()
68  ->internal()
69  ->gui()
70  ->standardRequest();
71  $this->mep_item_id = $this->mep_request->getItemId();
72 
73  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
74 
75  $this->tabs = $DIC->tabs();
76  $this->locator = $DIC["ilLocator"];
77  $this->help = $DIC["ilHelp"];
78 
79  $this->main_tpl = $DIC->ui()->mainTemplate();
80 
81  $this->upload = $DIC->upload();
82 
83  $this->mep_log = ilLoggerFactory::getLogger("mep");
84 
85  $this->db = $DIC->database();
86 
87  $this->mode = ($this->mep_request->getMode() !== "")
88  ? $this->mep_request->getMode()
89  : "listMedia";
90  $this->gui = $DIC->mediaPool()->internal()->gui();
91  $this->domain = $DIC->mediaPool()->internal()->domain();
92  $this->xsl = $DIC->copage()->internal()->domain()->xsl();
93  }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: shib_login.php:26
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjMediaPoolGUI::_goto ( string  $a_target)
static

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

References ilObject2GUI\$ctrl, $DIC, ilObject2GUI\$lng, ilObjectGUI\$ref_id, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilCtrl\redirectByClass(), ROOT_FOLDER_ID, ILIAS\UICore\GlobalTemplate\setOnScreenMessage(), ilCtrl\setParameterByClass(), and ilLanguage\txt().

1257  : void
1258  {
1259  global $DIC;
1260  $main_tpl = $DIC->ui()->mainTemplate();
1261 
1262  $ilAccess = $DIC->access();
1263  $lng = $DIC->language();
1264  $ctrl = $DIC->ctrl();
1265 
1266  $subitem_id = "";
1267  $targets = explode('_', $a_target);
1268  $ref_id = $targets[0];
1269  if (count((array) $targets) > 1) {
1270  $subitem_id = $targets[1];
1271  }
1272 
1273  $ctrl->setParameterByClass("ilMediaPoolPresentationGUI", "ref_id", $ref_id);
1274  if ($ilAccess->checkAccess("read", "", $ref_id)) {
1275  $ctrl->setParameterByClass("ilMediaPoolPresentationGUI", "mepitem_id", $subitem_id);
1276  $ctrl->redirectByClass("ilMediaPoolPresentationGUI", "");
1277  } elseif ($ilAccess->checkAccess("visible", "", $ref_id)) {
1278  $ctrl->redirectByClass("ilMediaPoolPresentationGUI", "infoScreen");
1279  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1280  $main_tpl->setOnScreenMessage('failure', sprintf(
1281  $lng->txt("msg_no_perm_read_item"),
1283  ), true);
1285  }
1286 
1287  throw new ilPermissionException($lng->txt("msg_no_perm_read"));
1288  }
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const ROOT_FOLDER_ID
Definition: constants.php:32
setParameterByClass(string $a_class, string $a_parameter, $a_value)
ilGlobalTemplateInterface $main_tpl
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:26
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjMediaPoolGUI::addLocatorItems ( )
protected

add locator items for media pool

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

References ilObject2GUI\$access, ilObject2GUI\$locator, $mep_item_id, ilObjectGUI\$obj_id, $path, ilObjectGUI\$tree, ILIAS\Repository\ctrl(), ilObject2GUI\getCreationMode(), ilTree\getPathFull(), and ilTree\getRootId().

961  : void
962  {
963  $ilLocator = $this->locator;
964  $ilAccess = $this->access;
965  if (!$this->getCreationMode() && $this->ctrl->getCmd() !== "explorer") {
966  $tree = $this->object->getTree();
969  foreach ($path as $node) {
970  if ($node["child"] == $tree->getRootId()) {
971  $this->ctrl->setParameter($this, "mepitem_id", "");
972  $link = "";
973  if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
974  $link = $this->ctrl->getLinkTarget($this, "listMedia");
975  } elseif ($ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
976  $link = $this->ctrl->getLinkTarget($this, "infoScreen");
977  }
978  $title = $this->object->getTitle();
979  $this->ctrl->setParameter($this, "mepitem_id", $this->mep_item_id);
980  $ilLocator->addItem($title, $link, "", $this->requested_ref_id);
981  }
982  }
983  }
984  }
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
$path
Definition: ltiservices.php:29
ilLocatorGUI $locator
ilAccessHandler $access
+ Here is the call graph for this function:

◆ addMobsToPool()

ilObjMediaPoolGUI::addMobsToPool ( array  $mob_ids,
string  $long_desc = "",
bool  $redirect = true,
bool  $extract = false 
)
protected

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

References ilObject2GUI\$ctrl, $mep_item_id, ilObjectGUI\$object, ilObjectGUI\$tree, ilObject2GUI\$user, ilObject\getId(), ilObject\getTitle(), ilTree\insertNode(), and ilCtrl\redirect().

Referenced by afterPoolInsert(), afterUpload(), and afterUrlSaving().

1708  : void {
1709  $ctrl = $this->ctrl;
1710  $user = $this->user;
1711 
1712  $item_ids = [];
1713  foreach ($mob_ids as $mob_id) {
1714  $object = new ilObjMediaObject($mob_id);
1715  if (!is_null($object)) {
1716  $mep_item = new ilMediaPoolItem();
1717  $mep_item->setTitle($object->getTitle());
1718  $mep_item->setType("mob");
1719  $mep_item->setForeignId($object->getId());
1720  $mep_item->create();
1721 
1722  $parent = $this->mep_item_id;
1723  $tree = $this->object->getTree();
1724  $tree->insertNode($mep_item->getId(), $parent);
1725  }
1726  }
1727 
1728  if ($redirect) {
1729  $ctrl->redirect($this, "listMedia");
1730  }
1731  }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
insertNode(int $a_node_id, int $a_parent_id, int $a_pos=self::POS_LAST_NODE, bool $a_reset_deletion_date=false)
insert new node with node_id under parent node with parent_id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterConstructor()

ilObjMediaPoolGUI::afterConstructor ( )
protected
Exceptions
ilCtrlException

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

References ilObject2GUI\$lng, ilObjectGUI\$tree, ILIAS\Repository\ctrl(), ilObject2GUI\getCreationMode(), ilLanguage\loadLanguageModule(), and ilTree\readRootId().

105  : void
106  {
107  $lng = $this->lng;
108  if ($this->mep_item_id == 0 && !$this->getCreationMode()) {
109  $tree = $this->object->getTree();
110  $this->mep_item_id = $tree->readRootId();
111  }
112 
113  $lng->loadLanguageModule("mep");
114 
115  if ($this->ctrl->getCmd() === "explorer") {
116  $this->ctrl->saveParameter($this, array("ref_id"));
117  } else {
118  $this->ctrl->saveParameter($this, array("ref_id", "mepitem_id"));
119  }
120  $this->ctrl->saveParameter($this, array("mep_mode"));
121 
122  $lng->loadLanguageModule("content");
123  }
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ afterPoolInsert()

ilObjMediaPoolGUI::afterPoolInsert ( array  $mob_ids)
protected

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

References addMobsToPool().

Referenced by executeCommand().

1733  : void
1734  {
1735  $this->addMobsToPool($mob_ids, "", true, true);
1736  }
addMobsToPool(array $mob_ids, string $long_desc="", bool $redirect=true, bool $extract=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterSave()

ilObjMediaPoolGUI::afterSave ( ilObject  $new_object)
protected

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

References ilObject\getRefId(), ILIAS\Repository\lng(), and ilUtil\redirect().

500  : void
501  {
502  // always send a message
503  $this->main_tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
504 
505  //ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
506  ilUtil::redirect("ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=" . $new_object->getRefId() . "&cmd=listMedia");
507  }
static redirect(string $a_script)
+ Here is the call graph for this function:

◆ afterUpload()

ilObjMediaPoolGUI::afterUpload (   $mob_ids)
protected

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

References addMobsToPool().

Referenced by executeCommand().

1693  : void
1694  {
1695  $this->addMobsToPool($mob_ids, "", false);
1696  }
addMobsToPool(array $mob_ids, string $long_desc="", bool $redirect=true, bool $extract=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterUrlSaving()

ilObjMediaPoolGUI::afterUrlSaving ( int  $mob_id,
string  $long_desc 
)
protected

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

References addMobsToPool().

Referenced by executeCommand().

1698  : void
1699  {
1700  $this->addMobsToPool([$mob_id], $long_desc);
1701  }
addMobsToPool(array $mob_ids, string $long_desc="", bool $redirect=true, bool $extract=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allMedia()

ilObjMediaPoolGUI::allMedia ( )

list all media objects

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

References ilObject2GUI\$ctrl, $tabs, ilObject2GUI\$tpl, ilObject2GUI\$user, ilObject2GUI\checkPermission(), ilMediaPoolTableGUI\IL_MEP_EDIT, ilMediaPoolItem\lookupTitle(), ILIAS\UICore\GlobalTemplate\setContent(), and setContentSubTabs().

Referenced by applyFilter(), and resetFilter().

581  : void
582  {
583  $tpl = $this->tpl;
584  $ilTabs = $this->tabs;
585  $ilCtrl = $this->ctrl;
586  $ilUser = $this->user;
587 
588  $ilCtrl->setParameter($this, "mep_mode", "allMedia");
589 
590  $this->checkPermission("read");
591  $ilTabs->setTabActive("content");
592  $this->setContentSubTabs("mep_all_mobs");
593 
594  $mep_table_gui = new ilMediaPoolTableGUI(
595  $this,
596  "allMedia",
597  $this->getMediaPool(),
598  "mepitem_id",
600  true
601  );
602 
603  if ($this->mep_request->getForceFilter() > 0) {
604  $mep_table_gui->setTitleFilter(
605  ilMediaPoolItem::lookupTitle($this->mep_request->getForceFilter())
606  );
607 
608  // Read again
609  $mep_table_gui = new ilMediaPoolTableGUI(
610  $this,
611  "allMedia",
612  $this->getMediaPool(),
613  "mepitem_id",
615  true
616  );
617  }
618 
619  $tpl->setContent($mep_table_gui->getHTML());
620  }
setContent(string $a_html)
Sets content for standard template.
static lookupTitle(int $a_id)
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
setContentSubTabs(string $a_active)
Set sub tabs for content tab.
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 625 of file class.ilObjMediaPoolGUI.php.

References allMedia(), and ilMediaPoolTableGUI\IL_MEP_EDIT.

625  : void
626  {
627  $mtab = new ilMediaPoolTableGUI(
628  $this,
629  "allMedia",
630  $this->getMediaPool(),
631  "mepitem_id",
633  true
634  );
635  $mtab->writeFilterToSession();
636  $mtab->resetOffset();
637  $this->allMedia();
638  }
allMedia()
list all media objects
TableGUI class for recent changes in wiki.
+ Here is the call graph for this function:

◆ bulkUpload()

ilObjMediaPoolGUI::bulkUpload ( )
protected

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

References $main_tpl, ilObject2GUI\checkPermission(), getBulkUploadForm(), and ILIAS\UICore\GlobalTemplate\setContent().

1446  : void
1447  {
1448  $this->checkPermission("write");
1449 
1451 
1452  $form = $this->getBulkUploadForm();
1453  $main_tpl->setContent($form->render());
1454  }
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $main_tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ cancelFolderUpdate()

ilObjMediaPoolGUI::cancelFolderUpdate ( )

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

References ilObject2GUI\$ctrl, ILIAS\Repository\object(), and ilCtrl\setParameter().

1103  : void
1104  {
1105  $ilCtrl = $this->ctrl;
1106  $ilCtrl->setParameter(
1107  $this,
1108  "mepitem_id",
1109  $this->object->getTree()->getParentId($this->mep_item_id)
1110  );
1111  $ilCtrl->redirect($this, "listMedia");
1112  }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ cancelRemove()

ilObjMediaPoolGUI::cancelRemove ( )

cancel deletion of media objects/folders

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

References ILIAS\Repository\ctrl().

903  : void
904  {
905  $this->ctrl->redirect($this, $this->mode);
906  }
+ Here is the call graph for this function:

◆ cancelSave()

ilObjMediaPoolGUI::cancelSave ( )

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

References ilObject2GUI\$ctrl, and ilCtrl\redirect().

1114  : void
1115  {
1116  $ilCtrl = $this->ctrl;
1117  $ilCtrl->redirect($this, "listMedia");
1118  }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ confirmRemove()

ilObjMediaPoolGUI::confirmRemove ( )

confirm remove of mobs

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObjectGUI\$obj_id, ilObject2GUI\$type, ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ilPageContentUsage\getUsages(), ILIAS\Repository\lng(), ilMediaPoolItem\lookupTitle(), ilMediaPoolItem\lookupType(), and ilLanguage\txt().

808  : void
809  {
810  $ilCtrl = $this->ctrl;
811  $lng = $this->lng;
812 
813  $this->checkPermission("write");
814 
815  $ids = $this->mep_request->getItemIds();
816  if (count($ids) === 0) {
817  $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
818  $ilCtrl->redirect($this, "");
819  }
820 
821  // display confirmation message
822  $cgui = new ilConfirmationGUI();
823  $cgui->setFormAction($this->ctrl->getFormAction($this));
824  $cgui->setHeaderText($this->lng->txt("info_remove_sure"));
825  $cgui->setCancel($this->lng->txt("cancel"), "cancelRemove");
826  $cgui->setConfirm($this->lng->txt("confirm"), "remove");
827 
828  foreach ($ids as $obj_id) {
830  $title = ilMediaPoolItem::lookupTitle($obj_id);
831 
832  // check whether page can be removed
833  $add = "";
834  if ($type === "pg") {
835  $usages = ilPageContentUsage::getUsages("incl", $obj_id, false);
836  if (count($usages) > 0) {
837  $this->main_tpl->setOnScreenMessage('failure', sprintf($lng->txt("mep_content_snippet_in_use"), $title), true);
838  $ilCtrl->redirect($this, "listMedia");
839  } else {
840  // check whether the snippet is used in older versions of pages
841  $usages = ilPageContentUsage::getUsages("incl", $obj_id, true);
842  if (count($usages) > 0) {
843  $add = "<div class='small'>" . $lng->txt("mep_content_snippet_used_in_older_versions") . "</div>";
844  }
845  }
846  }
847 
848  $caption =
849  " " . $title . $add;
850 
851  $cgui->addItem("id[]", $obj_id, $caption);
852  }
853 
854  $this->tpl->setContent($cgui->getHTML());
855  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static lookupTitle(int $a_id)
static getUsages(string $a_pc_type, int $a_pc_id, bool $a_incl_hist=true)
Get usages.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static lookupType(int $a_id)
+ Here is the call graph for this function:

◆ copyToClipboard()

ilObjMediaPoolGUI::copyToClipboard ( )

copy media objects to clipboard

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

References ilObjectGUI\$obj_id, ilObject2GUI\$type, ilObject2GUI\$user, ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilMediaPoolItem\lookupForeignId(), and ilMediaPoolItem\lookupType().

925  : void
926  {
927  $ilUser = $this->user;
928 
929  $this->checkPermission("write");
930 
931  $ids = $this->mep_request->getItemIds();
932  if (count($ids) === 0) {
933  $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
934  $this->ctrl->redirect($this, $this->mode);
935  }
936 
937  foreach ($ids as $obj_id) {
939  if ($type === "fold") {
940  $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt("cont_cant_copy_folders"), true);
941  $this->ctrl->redirect($this, $this->mode);
942  }
943  }
944  foreach ($ids as $obj_id) {
945  $fid = ilMediaPoolItem::lookupForeignId($obj_id);
947  if ($type === "mob") {
948  $ilUser->addObjectToClipboard($fid, "mob", "");
949  }
950  if ($type === "pg") {
951  $ilUser->addObjectToClipboard($obj_id, "incl", "");
952  }
953  }
954  $this->main_tpl->setOnScreenMessage('success', $this->lng->txt("copied_to_clipboard"), true);
955  $this->ctrl->redirect($this, $this->mode);
956  }
static lookupForeignId(int $a_id)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static lookupType(int $a_id)
+ Here is the call graph for this function:

◆ createFolderForm()

ilObjMediaPoolGUI::createFolderForm ( )

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

References ilObject2GUI\$tpl, ilObject2GUI\checkPermission(), ILIAS\Repository\form(), initFolderForm(), and ILIAS\UICore\GlobalTemplate\setContent().

990  : void
991  {
992  $tpl = $this->tpl;
993 
994  $this->checkPermission("write");
995 
996  $this->initFolderForm("create");
997  $tpl->setContent($this->form->getHTML());
998  }
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
form( $class_path, string $cmd, string $submit_caption="")
initFolderForm(string $a_mode="edit")
+ Here is the call graph for this function:

◆ createMediaObject()

ilObjMediaPoolGUI::createMediaObject ( )

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

References ILIAS\Repository\ctrl().

495  : void
496  {
497  $this->ctrl->redirectByClass("ilobjmediaobjectgui", "create");
498  }
+ Here is the call graph for this function:

◆ edit()

ilObjMediaPoolGUI::edit ( )

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

References ILIAS\Repository\ctrl().

509  : void
510  {
511  $this->ctrl->redirectByClass(SettingsGUI::class);
512  }
+ Here is the call graph for this function:

◆ editFolder()

ilObjMediaPoolGUI::editFolder ( )

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

References ilObject2GUI\$tpl, ilObject2GUI\checkPermission(), ILIAS\Repository\form(), getFolderValues(), initFolderForm(), and ILIAS\UICore\GlobalTemplate\setContent().

1000  : void
1001  {
1002  $tpl = $this->tpl;
1003 
1004  $this->checkPermission("write");
1005 
1006  $this->initFolderForm();
1007  $this->getFolderValues();
1008  $tpl->setContent($this->form->getHTML());
1009  }
getFolderValues()
Get current values for folder from.
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
form( $class_path, string $cmd, string $submit_caption="")
initFolderForm(string $a_mode="edit")
+ Here is the call graph for this function:

◆ editTitlesAndDescriptions()

ilObjMediaPoolGUI::editTitlesAndDescriptions ( )
protected

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

References ilObject2GUI\$ctrl, ilObject2GUI\$html, ilObject2GUI\$lng, $main_tpl, ilAccordionGUI\ALL_CLOSED, ilObject2GUI\checkPermission(), ilCtrl\getFormAction(), ilPropertyFormGUI\getHTML(), ilMediaItem\getMediaItemsForUploadHash(), initMediaBulkForm(), ilCtrl\saveParameter(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

1572  : void
1573  {
1574  $ctrl = $this->ctrl;
1575  $lng = $this->lng;
1576 
1577  $this->checkPermission("write");
1578  $ctrl->saveParameter($this, "mep_hash");
1579 
1581 
1583  $this->mep_request->getUploadHash()
1584  );
1585 
1586  $tb = new ilToolbarGUI();
1587  $tb->setFormAction($ctrl->getFormAction($this));
1588  $tb->addFormButton($lng->txt("save"), "saveTitlesAndDescriptions");
1589  $tb->setOpenFormTag(true);
1590  $tb->setCloseFormTag(false);
1591  $tb->setId("tb_top");
1592 
1593  $html = $tb->getHTML();
1594  foreach ($media_items as $mi) {
1595  $acc = new ilAccordionGUI();
1596  $acc->setBehaviour(ilAccordionGUI::ALL_CLOSED);
1597  $acc->setId("acc_" . $mi["mob_id"]);
1598 
1599  $mob = new ilObjMediaObject($mi["mob_id"]);
1600  $form = $this->initMediaBulkForm($mi["mob_id"], $mob->getTitle());
1601  $acc->addItem($mob->getTitle(), $form->getHTML());
1602 
1603  $html .= $acc->getHTML();
1604  }
1605 
1606  $html .= $tb->getHTML();
1607  $tb->setOpenFormTag(false);
1608  $tb->setCloseFormTag(true);
1609  $tb->setId("tb_bottom");
1610 
1612  }
getFormAction(object $a_gui_obj, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $main_tpl
static getMediaItemsForUploadHash(string $a_hash)
Get media items for upload hash.
initMediaBulkForm(int $a_id, string $a_title)
Init media bulk form.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
saveParameter(object $a_gui_obj, $a_parameter)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ executeCommand()

ilObjMediaPoolGUI::executeCommand ( )
Exceptions
ilCtrlException
ilObjectException
ilPermissionException

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

References ilObject2GUI\$access, ilObject2GUI\$ctrl, ilObject2GUI\$lng, $mep_item_id, ilObjectGUI\$object, $tabs, ilObject2GUI\$tpl, ilObjectGUI\$tree, ILIAS\Repository\access(), ilObjectGUI\addHeaderAction(), afterPoolInsert(), afterUpload(), afterUrlSaving(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), finishSingleUpload(), getBulkUploadForm(), ilObject2GUI\getCreationMode(), ilObject\getId(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjectGUI\getObject(), getParentFolderId(), ilTree\getParentId(), getTemplate(), ilObject\getTitle(), ILIAS\FileDelivery\http(), infoScreen(), ilTree\insertNode(), ILIAS\Repository\lng(), ilMediaPoolItem\lookupForeignId(), null, ILIAS\Repository\object(), onMobUpdate(), ilObject2GUI\prepareOutput(), ilUtil\redirect(), ILIAS\Repository\refinery(), ilPageObjectGUI\setAdvMdRecordObject(), ILIAS\UICore\GlobalTemplate\setContent(), setContentSubTabs(), ilObject2GUI\setCreationMode(), ilObject2GUI\setLocator(), setSettingsSubTabs(), ILIAS\MediaPool\InternalGUIService\settings(), ILIAS\Repository\toolbar(), ilLanguage\txt(), ilMediaCreationGUI\TYPE_ALL, and ILIAS\Repository\user().

135  : void
136  {
137  $ilTabs = $this->tabs;
138  $lng = $this->lng;
139  $ilAccess = $this->access;
140  $tpl = $this->tpl;
141  $ilCtrl = $this->ctrl;
142 
143  $tree = null;
144  if ($this->object) {
145  $tree = $this->object->getTree();
146  }
147 
148  $next_class = $this->ctrl->getNextClass($this);
149  $cmd = $this->ctrl->getCmd();
150  $new_type = $this->mep_request->getNewType();
151 
152 
153 
154  if ($new_type !== "" && ($cmd !== "confirmRemove" && $cmd !== "copyToClipboard"
155  && $cmd !== "pasteFromClipboard")) {
156  $this->tpl->setPermanentLink("mep", $this->ref_id);
157  $this->setCreationMode(true);
158  }
159 
160  if ($cmd === "create") {
161  switch ($this->mep_request->getNewType()) {
162  case "mob":
163  $this->ctrl->redirectByClass("ilobjmediaobjectgui", "create");
164  break;
165 
166  case "fold":
167  $this->ctrl->redirectByClass("ilobjfoldergui", "create");
168  break;
169  }
170  }
171 
172  switch ($next_class) {
173  case 'ilobjectmetadatagui':
174  $this->checkPermission("write");
175 
176  $this->prepareOutput();
177  $this->addHeaderAction();
178 
179  $this->tabs_gui->activateTab('meta_data');
180  $md_gui = new ilObjectMetaDataGUI($this->object, ['mob', "mpg"]);
181  $this->ctrl->forwardCommand($md_gui);
182  $this->tpl->printToStdout();
183  break;
184 
185  case strtolower(ilRepoStandardUploadHandlerGUI::class):
186  $this->checkPermission("write");
187  $form = $this->getBulkUploadForm();
188  $gui = $form->getRepoStandardUploadHandlerGUI("media_files");
189  $this->ctrl->forwardCommand($gui);
190  break;
191 
192  case 'ilmediapoolpagegui':
193  $this->checkPermission("write");
194  $this->prepareOutput();
195  //$this->addHeaderAction();
196  $ilTabs->clearTargets();
197  $ilCtrl->setReturn($this, "returnFromItem");
198  $mep_page_gui = new ilMediaPoolPageGUI(
199  $this->mep_item_id,
200  $this->mep_request->getOldNr()
201  );
202  $mep_page_gui->setPoolGUI($this);
203  $mep_page_gui->setAdvMdRecordObject($this->object->getRefId(), "mep", "mpg");
204 
205  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
206  $mep_page_gui->setEnableEditing(false);
207  }
208  $ret = $this->ctrl->forwardCommand($mep_page_gui);
209  if ($ret != "") {
210  $tpl->setContent($ret);
211  }
212  $this->tpl->printToStdout();
213  break;
214 
215  case "ilobjmediaobjectgui":
216  $this->checkPermission("write");
217  if ($cmd === "create" || $cmd === "save" || $cmd === "cancel") {
218  $ret_obj = $this->mep_item_id;
219  $ilObjMediaObjectGUI = new ilObjMediaObjectGUI("", 0, false, false);
220  $ilObjMediaObjectGUI->setWidthPreset((int) $this->getMediaPool()->getDefaultWidth());
221  $ilObjMediaObjectGUI->setHeightPreset((int) $this->getMediaPool()->getDefaultHeight());
222  } else {
223  $ret_obj = $tree->getParentId($this->mep_item_id);
224  $ilObjMediaObjectGUI = new ilObjMediaObjectGUI("", ilMediaPoolItem::lookupForeignId($this->mep_item_id), false, false);
225  $this->ctrl->setParameter($this, "mepitem_id", $this->getParentFolderId());
226  $ilTabs->setBackTarget(
227  $lng->txt("back"),
228  $this->ctrl->getLinkTarget(
229  $this,
230  $this->mode
231  )
232  );
233  }
234  if ($this->ctrl->getCmdClass() === "ilinternallinkgui") {
235  $this->ctrl->setReturn($this, "explorer");
236  } else {
237  $this->ctrl->setParameter($this, "mepitem_id", $ret_obj);
238  $this->ctrl->setReturn(
239  $this,
240  $this->mode
241  );
242  $this->ctrl->setParameter($this, "mepitem_id", $this->mep_item_id);
243  }
244  $this->getTemplate();
245  $ilObjMediaObjectGUI->setTabs();
246  $this->setLocator();
247 
248  // set adv metadata record dobject
249  $ilObjMediaObjectGUI->setAdvMdRecordObject($this->object->getRefId(), "mep", "mob");
250 
251  $ret = $this->ctrl->forwardCommand($ilObjMediaObjectGUI);
252  if ($cmd === "save") {
253  $object = $ilObjMediaObjectGUI->getObject();
254  if (!is_null($object)) {
255  $mep_item = new ilMediaPoolItem();
256  $mep_item->setTitle($object->getTitle());
257  $mep_item->setType("mob");
258  $mep_item->setForeignId($object->getId());
259  $mep_item->create();
260 
261  $parent = $this->mep_item_id;
262  $tree->insertNode($mep_item->getId(), $parent);
264  "ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=" .
265  $this->requested_ref_id . "&mepitem_id=" . $this->mep_item_id
266  );
267  }
268  }
269  $this->tpl->printToStdout();
270  break;
271 
272  case "ilmediacreationgui":
273  $this->checkPermission("write");
274  $this->prepareOutput();
275  $this->ctrl->setReturn($this, "listMedia");
276  //$ilTabs->activateTab("content");
277  //$this->addContentSubTabs("manage");
278  $med_type = [];
279  $creation = new ilMediaCreationGUI([ilMediaCreationGUI::TYPE_ALL], function ($mob_id) {
280  $this->afterUpload($mob_id);
281  }, function ($mob_id, $long_desc) {
282  $this->afterUrlSaving($mob_id, $long_desc);
283  }, function ($mob_ids) {
284  $this->afterPoolInsert($mob_ids);
285  }, function ($mob_id) {
286  $this->finishSingleUpload($mob_id);
287  }, function ($mob_id) {
288  $this->onMobUpdate($mob_id);
289  });
290  $this->ctrl->forwardCommand($creation);
291  $this->tpl->printToStdout();
292  break;
293 
294 
295  case "ilobjfoldergui":
296  $this->checkPermission("write");
297  $this->addHeaderAction();
298  $folder_gui = new ilObjFolderGUI("", 0, false, false);
299  $this->ctrl->setReturn($this, "listMedia");
300  $cmd .= "Object";
301  switch ($cmd) {
302  case "createObject":
303  $this->prepareOutput();
304  $folder_gui = new ilObjFolderGUI("", 0, false, false);
305  $folder_gui->setFormAction(
306  "save",
307  $this->ctrl->getFormActionByClass("ilobjfoldergui")
308  );
309  $folder_gui->createObject();
310  $this->tpl->printToStdout();
311  break;
312 
313  case "saveObject":
314  $parent = $this->mep_item_id;
315  $folder_gui->setFolderTree($tree);
316  $folder_gui->saveObject();
317  break;
318 
319  case "editObject":
320  $this->prepareOutput();
321  $folder_gui = new ilObjFolderGUI(
322  "",
323  ilMediaPoolItem::lookupForeignId($this->mep_item_id),
324  false,
325  false
326  );
327  $this->ctrl->setParameter($this, "foldereditmode", "1");
328  $folder_gui->setFormAction("update", $this->ctrl->getFormActionByClass("ilobjfoldergui"));
329  $folder_gui->editObject();
330  $this->tpl->printToStdout();
331  break;
332 
333  case "updateObject":
334  $folder_gui = new ilObjFolderGUI(
335  "",
336  ilMediaPoolItem::lookupForeignId($this->mep_item_id),
337  false,
338  false
339  );
340  $this->ctrl->setParameter($this, "mepitem_id", $this->getParentFolderId());
341  $this->ctrl->setReturn($this, "listMedia");
342  $folder_gui->updateObject(); // this returns to parent
343  break;
344 
345  case "cancelObject":
346  if ($this->mep_request->getFolderEditMode()) {
347  $this->ctrl->setParameter($this, "mepitem_id", $this->getParentFolderId());
348  }
349  $this->ctrl->redirect($this, "listMedia");
350  break;
351  }
352  break;
353 
354  case "ileditclipboardgui":
355  $this->prepareOutput();
356  $this->addHeaderAction();
357  $this->ctrl->setReturn($this, $this->mode);
358  $clip_gui = new ilEditClipboardGUI();
359  $clip_gui->setMultipleSelections(true);
360  $clip_gui->setInsertButtonTitle($lng->txt("mep_copy_to_mep"));
361  $ilTabs->setTabActive("clipboard");
362  $this->ctrl->forwardCommand($clip_gui);
363  $this->tpl->printToStdout();
364  break;
365 
366  case 'ilinfoscreengui':
367  $this->prepareOutput();
368  $this->addHeaderAction();
369  $this->infoScreen();
370  $this->tpl->printToStdout();
371  break;
372 
373  case 'ilpermissiongui':
374  $this->checkPermission("edit_permission");
375  $this->prepareOutput();
376  $this->addHeaderAction();
377  $perm_gui = new ilPermissionGUI($this);
378  $ilTabs->activateTab("perm_settings");
379  $this->ctrl->forwardCommand($perm_gui);
380  $this->tpl->printToStdout();
381  break;
382 
383  case "ilexportgui":
384  $this->checkPermission("write");
385  $this->prepareOutput();
386  $this->addHeaderAction();
387  $ilTabs->activateTab("export");
388  $exp_gui = new ilExportGUI($this);
389  $this->ctrl->forwardCommand($exp_gui);
390  $this->tpl->printToStdout();
391  break;
392 
393  case "ilcommonactiondispatchergui":
395  $this->ctrl->forwardCommand($gui);
396  break;
397 
398  case strtolower(TranslationGUI::class):
399  $this->prepareOutput();
400  $this->addHeaderAction();
401  //$this->setTabs("settings");
402  $ilTabs->activateTab("settings");
403  $this->setSettingsSubTabs("obj_multilinguality");
404  $transgui = new TranslationGUI(
405  $this->getObject(),
406  $this->lng,
407  $this->access,
408  $this->user,
409  $this->ctrl,
410  $this->tpl,
411  $this->ui_factory,
412  $this->ui_renderer,
413  $this->http,
414  $this->refinery,
415  $this->toolbar
416  );
417  $transgui->forceContentTranslation();
418  $this->ctrl->forwardCommand($transgui);
419  $this->tpl->printToStdout();
420  break;
421 
422  case "ilmediapoolimportgui":
423  $this->prepareOutput();
424  $this->addHeaderAction();
425  $this->checkPermission("write");
426  $ilTabs->activateTab("import");
427  $gui = new ilMediaPoolImportGUI($this->getMediaPool());
428  $this->ctrl->forwardCommand($gui);
429  $this->tpl->printToStdout();
430  break;
431 
432  case "ilmobmultisrtuploadgui":
433  $this->checkPermission("write");
434  $this->prepareOutput();
435  $this->addHeaderAction();
436  $this->setContentSubTabs("srt_files");
437  $gui = new ilMobMultiSrtUploadGUI(new ilMepMultiSrt($this->getMediaPool()));
438  $this->ctrl->forwardCommand($gui);
439  $this->tpl->printToStdout();
440  break;
441 
442  case strtolower(ilObjectMetaDataGUI::class):
443  $this->checkPermission("write");
444  $this->prepareOutput();
445  $this->addHeaderAction();
446  $ilTabs->activateTab("meta_data");
447  $gui = new ilObjectMetaDataGUI($this->object);
448  $this->ctrl->forwardCommand($gui);
449  break;
450 
451  case strtolower(SettingsGUI::class):
452  $this->checkPermission("write");
453  $this->prepareOutput();
454  $this->addHeaderAction();
455  $this->setSettingsSubTabs("settings");
456  $ilTabs->activateTab("settings");
457  $gui = $this->gui->settings()->settingsGUI(
458  $this->object->getId()
459  );
460  $this->ctrl->forwardCommand($gui);
461  $this->tpl->printToStdout();
462  break;
463 
464  default:
465  $this->prepareOutput();
466  $this->addHeaderAction();
467  $cmd = $this->ctrl->getCmd("listMedia") ?: "listMedia";
468  $this->$cmd();
469  if (!$this->getCreationMode()) {
470  $this->tpl->printToStdout();
471  }
472  break;
473  }
474  }
setLocator()
set Locator
Class ilObjectMetaDataGUI.
Class ilObjFolderGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
infoScreen()
show information screen
static lookupForeignId(int $a_id)
setContent(string $a_html)
Sets content for standard template.
prepareOutput(bool $show_sub_objects=true)
getTemplate()
Get standard template.
setSettingsSubTabs(string $a_active)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setAdvMdRecordObject(int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
Set object, that defines the adv md records being used.
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setCreationMode(bool $mode=true)
afterUrlSaving(int $mob_id, string $long_desc)
ilGlobalTemplateInterface $tpl
Import related features for media pools (currently used for translation imports)
getParentId(int $a_node_id)
get parent id of given node
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static redirect(string $a_script)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Editing User Interface for MediaObjects within LMs (see ILIAS DTD)
InternalGUIService $gui
getParentFolderId()
Get folder parent ID.
insertNode(int $a_node_id, int $a_parent_id, int $a_pos=self::POS_LAST_NODE, bool $a_reset_deletion_date=false)
insert new node with node_id under parent node with parent_id
addHeaderAction()
Add header action menu.
Class ilMediaPoolPage GUI class.
setContentSubTabs(string $a_active)
Set sub tabs for content tab.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
ilAccessHandler $access
+ Here is the call graph for this function:

◆ export()

ilObjMediaPoolGUI::export ( )

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

References ilUtil\stripSlashes().

1430  : void
1431  {
1432  $ot = $this->object->getObjectProperties()->getPropertyTranslations();
1433  $opt = "";
1434  if ($ot->getContentTranslationActivated()) {
1435  $format = explode("_", $this->mep_request->getExportFormat());
1436  $opt = ilUtil::stripSlashes($format[1]);
1437  }
1438 
1439  $this->object->exportXML($opt);
1440  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
+ Here is the call graph for this function:

◆ finishSingleUpload()

ilObjMediaPoolGUI::finishSingleUpload ( int  $mob_id)

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

References ILIAS\Repository\ctrl().

Referenced by executeCommand().

1738  : void
1739  {
1740  $this->ctrl->redirect($this, "listMedia");
1741  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBulkUploadForm()

ilObjMediaPoolGUI::getBulkUploadForm ( )
protected

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

References $bulk_upload_form, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by bulkUpload(), and executeCommand().

1456  : FormAdapterGUI
1457  {
1458  if (is_null($this->bulk_upload_form)) {
1459  $mep_hash = uniqid();
1460  $this->ctrl->setParameter($this, "mep_hash", $mep_hash);
1461  $this->bulk_upload_form = $this->gui
1462  ->form(self::class, 'performBulkUpload')
1463  ->section("props", $this->lng->txt('mep_bulk_upload'))
1464  ->file(
1465  "media_files",
1466  $this->lng->txt("mep_media_files"),
1467  \Closure::fromCallable([$this, 'handleUploadResult']),
1468  "mep_id",
1469  "",
1470  20
1471  );
1472  // ->meta()->text()->meta()->textarea()
1473  }
1474  return $this->bulk_upload_form;
1475  }
FormAdapterGUI $bulk_upload_form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFolderValues()

ilObjMediaPoolGUI::getFolderValues ( )

Get current values for folder from.

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

References ILIAS\Repository\form(), and ilMediaPoolItem\lookupTitle().

Referenced by editFolder().

1014  : void
1015  {
1016  $values = array();
1017 
1018  $values["title"] = ilMediaPoolItem::lookupTitle($this->mep_item_id);
1019 
1020  $this->form->setValuesByArray($values);
1021  }
static lookupTitle(int $a_id)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMediaPoolPageGUI()

ilObjMediaPoolGUI::getMediaPoolPageGUI (   $mep_item_id,
  $old_nr = 0 
)
protected

Get media pool page.

Parameters

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

Referenced by showPage().

768  {
769  $page_gui = new ilMediaPoolPageGUI($mep_item_id, $old_nr);
770  $page_gui->setPoolGUI($this);
771 
772  return $page_gui;
773  }
Class ilMediaPoolPage GUI class.
+ Here is the caller graph for this function:

◆ getParentFolderId()

ilObjMediaPoolGUI::getParentFolderId ( )

Get folder parent ID.

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

References null, and ILIAS\Repository\object().

Referenced by executeCommand().

667  : ?int
668  {
669  if ($this->mep_item_id == 0) {
670  return null;
671  }
672  $par_id = $this->object->getPoolTree()->getParentId($this->mep_item_id);
673  if ($par_id != $this->object->getPoolTree()->getRootId()) {
674  return (int) $par_id;
675  }
676 
677  return null;
678  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPreviewModalHTML()

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

Get preview modal html.

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

References $DIC, ilObject2GUI\$html, ilObject2GUI\$lng, ilObjectGUI\$request, ilObject2GUI\$tpl, ILIAS\UICore\GlobalTemplate\addJavaScript(), ilObjMediaObjectGUI\includePresentationJS(), and ilLanguage\txt().

Referenced by ilMediaPoolTableGUI\getHTML().

1390  : string {
1391  global $DIC;
1392 
1393  $tpl = $DIC["tpl"];
1394  $ilCtrl = $DIC->ctrl();
1395  $lng = $DIC->language();
1396  $internal_gui = $DIC->mediaPool()
1397  ->internal()
1398  ->gui();
1399  $request = $internal_gui
1400  ->standardRequest();
1401 
1403 
1404  $tpl->addJavaScript("assets/js/ilMediaPool.js");
1405 
1406  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", "");
1407  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "ref_id", $a_mpool_ref_id);
1408  $tpl->addOnloadCode("il.MediaPool.setPreviewUrl('" . $ilCtrl->getLinkTargetByClass(array("ilmediapoolpresentationgui", "ilobjmediapoolgui"), "showPreview", "", false, false) . "');");
1409  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", $request->getItemId());
1410  $ilCtrl->setParameterByClass(
1411  "ilobjmediapoolgui",
1412  "ref_id",
1413  $request->getRefId()
1414  );
1415 
1416  $modal = $internal_gui->ui()->factory()->modal()->roundtrip(
1417  $lng->txt("preview"),
1418  $internal_gui->ui()->factory()->legacy()->content("<iframe id='ilMepPreviewContent'></iframe>")
1419  );
1420  $html = $internal_gui->ui()->renderer()->render($modal);
1421  $html = str_replace(
1422  "<iframe id='ilMepPreviewContent'",
1423  "<iframe data-signal='" . $modal->getShowSignal()->getId() . "' id='ilMepPreviewContent'",
1424  $html
1425  );
1426 
1427  return $html;
1428  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static includePresentationJS(?ilGlobalTemplateInterface $a_tpl=null)
Include media object presentation JS.
ServerRequestInterface $request
global $DIC
Definition: shib_login.php:26
ilGlobalTemplateInterface $tpl
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
+ 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 658 of file class.ilObjMediaPoolGUI.php.

Referenced by executeCommand().

658  : void
659  {
660  $this->tpl->loadStandardTemplate();
661  }
+ Here is the caller graph for this function:

◆ getType()

ilObjMediaPoolGUI::getType ( )
final

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

125  : string
126  {
127  return "mep";
128  }

◆ handleUploadResult()

ilObjMediaPoolGUI::handleUploadResult ( FileUpload  $upload,
UploadResult  $result 
)
protected

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

References $mep_item_id, ilObjectGUI\$tree, ILIAS\FileUpload\DTO\UploadResult\getName(), and ilTree\insertNode().

1480  : BasicHandlerResult {
1481  $title = $result->getName();
1482 
1483  $mob = new ilObjMediaObject();
1484  $mob->setTitle($title);
1485  $mob->setDescription("");
1486  $mob->create();
1487 
1488  $media_item = $mob->addMediaItemFromUpload(
1489  "Standard",
1490  $result,
1491  $this->mep_request->getUploadHash()
1492  );
1493 
1494  $mob->update();
1495 
1496  /*
1497  $mob->createDirectory();
1498  $media_item = new ilMediaItem();
1499  $mob->addMediaItem($media_item);
1500  $media_item->setPurpose("Standard");
1501 
1502  $mob_dir = ilObjMediaObject::_getRelativeDirectory($mob->getId());
1503  $file_name = ilObjMediaObject::fixFilename($title);
1504  $file = $mob_dir . "/" . $file_name;
1505 
1506  $upload->moveOneFileTo(
1507  $result,
1508  $mob_dir,
1509  Location::WEB,
1510  $file_name,
1511  true
1512  );*/
1513 
1514  // duration
1515  $med_item = $mob->getMediaItem("Standard");
1516  $med_item->determineDuration();
1517  $med_item->update();
1518 
1519 
1520  $mep_item = new ilMediaPoolItem();
1521  $mep_item->setTitle($title);
1522  $mep_item->setType("mob");
1523  $mep_item->setForeignId($mob->getId());
1524  $mep_item->create();
1525 
1526  $tree = $this->object->getTree();
1527  $parent = $this->mep_item_id;
1528  $tree->insertNode($mep_item->getId(), $parent);
1529 
1530  // get mime type
1531  /*
1532  $format = ilObjMediaObject::getMimeType($file);
1533  $location = $file_name;
1534 
1535  // set real meta and object data
1536  $media_item->setFormat($format);
1537  $media_item->setLocation($location);
1538  $media_item->setLocationType("LocalFile");
1539  $media_item->setUploadHash($this->mep_request->getUploadHash());
1540  $mob->update();*/
1541 
1542  $item_ids[] = $mob->getId();
1543 
1544  /*
1545  $mob = new ilObjMediaObject($mob->getId());
1546  $mob->generatePreviewPic(320, 240);*/
1547 
1548  // duration
1549  /*
1550  $med_item = $mob->getMediaItem("Standard");
1551  $med_item->determineDuration();
1552  $med_item->update();*/
1553 
1554  return new BasicHandlerResult(
1555  "mep_id",
1556  HandlerResult::STATUS_OK,
1557  $med_item->getId(),
1558  ''
1559  );
1560  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
insertNode(int $a_node_id, int $a_parent_id, int $a_pos=self::POS_LAST_NODE, bool $a_reset_deletion_date=false)
insert new node with node_id under parent node with parent_id
+ Here is the call graph for this function:

◆ infoScreen()

ilObjMediaPoolGUI::infoScreen ( )

show information screen

Exceptions
ilCtrlException
ilPermissionException

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

References ilObject2GUI\$access, $info, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

1303  : void
1304  {
1305  $this->tabs->activateTab("info_short");
1306  $ilAccess = $this->access;
1307 
1308  if (!$ilAccess->checkAccess("visible", "", $this->ref_id) &&
1309  !$ilAccess->checkAccess("read", "", $this->ref_id) &&
1310  !$ilAccess->checkAccess("write", "", $this->ref_id)) {
1311  throw new ilPermissionException($this->lng->txt("msg_no_perm_read"));
1312  }
1313 
1314  if ($this->ctrl->getCmd() === "infoScreen") {
1315  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
1316  }
1317 
1318  $info = new ilInfoScreenGUI($this);
1319 
1320  $info->enablePrivateNotes();
1321 
1322 
1323  // standard meta data
1324  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1325 
1326  // forward the command
1327  $this->ctrl->forwardCommand($info);
1328  }
$info
Definition: entry_point.php:21
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjMediaPoolGUI::infoScreenObject ( )

this one is called from the info button in the repository

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

References ILIAS\Repository\ctrl().

1293  : void
1294  {
1295  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
1296  }
+ Here is the call graph for this function:

◆ initFolderForm()

ilObjMediaPoolGUI::initFolderForm ( string  $a_mode = "edit")
Parameters
string$a_mode"edit" | "create"
Exceptions
ilCtrlException

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ILIAS\Repository\form(), and ilLanguage\txt().

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

1076  : void
1077  {
1078  $lng = $this->lng;
1079  $ilCtrl = $this->ctrl;
1080 
1081  $this->form = new ilPropertyFormGUI();
1082 
1083  // desc
1084  $ti = new ilTextInputGUI($lng->txt("title"), "title");
1085  $ti->setMaxLength(128);
1086  $ti->setRequired(true);
1087  $this->form->addItem($ti);
1088 
1089  // save and cancel commands
1090  if ($a_mode === "create") {
1091  $this->form->addCommandButton("saveFolder", $lng->txt("save"));
1092  $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
1093  $this->form->setTitle($lng->txt("mep_new_folder"));
1094  } else {
1095  $this->form->addCommandButton("updateFolder", $lng->txt("save"));
1096  $this->form->addCommandButton("cancelFolderUpdate", $lng->txt("cancel"));
1097  $this->form->setTitle($lng->txt("mep_edit_folder"));
1098  }
1099 
1100  $this->form->setFormAction($ilCtrl->getFormAction($this));
1101  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMediaBulkForm()

ilObjMediaPoolGUI::initMediaBulkForm ( int  $a_id,
string  $a_title 
)

Init media bulk form.

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

References $form, ilObject2GUI\$lng, ilPropertyFormGUI\addItem(), ilFormGUI\setCloseTag(), ilFormGUI\setOpenTag(), and ilLanguage\txt().

Referenced by editTitlesAndDescriptions(), and saveTitlesAndDescriptions().

1620  : ilPropertyFormGUI {
1621  $lng = $this->lng;
1622 
1623  $form = new ilPropertyFormGUI();
1624  $form->setOpenTag(false);
1625  $form->setCloseTag(false);
1626 
1627  // title
1628  $ti = new ilTextInputGUI($lng->txt("title"), "title_" . $a_id);
1629  $ti->setValue($a_title);
1630  $form->addItem($ti);
1631 
1632  // description
1633  $ti = new ilTextAreaInputGUI($lng->txt("description"), "description_" . $a_id);
1634  $form->addItem($ti);
1635 
1636  return $form;
1637  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setCloseTag(bool $a_val)
setOpenTag(bool $a_open)
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertFromClipboard()

ilObjMediaPoolGUI::insertFromClipboard ( )

insert media object from clipboard

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

References ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

884  : void
885  {
886  $this->checkPermission("write");
887 
888  $this->domain->mediapool($this->object->getId())
889  ->copySelectedFromEditClipboard($this->mep_item_id);
890 
891  /*
892  if (count($not_inserted) > 0) {
893  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("mep_not_insert_already_exist") . "<br>" .
894  implode("<br>", $not_inserted), true);
895  }*/
896  $this->ctrl->redirect($this, $this->mode);
897  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ listMedia()

ilObjMediaPoolGUI::listMedia ( )

list media objects

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

References ilObject2GUI\$access, ilObject2GUI\$ctrl, ilObject2GUI\$lng, $tabs, ilObject2GUI\$toolbar, ilObject2GUI\$tpl, ilObject2GUI\checkPermission(), ilSession\get(), ILIAS\UICore\GlobalTemplate\setContent(), setContentSubTabs(), and ilLanguage\txt().

Referenced by returnFromItem().

518  : void
519  {
520  $ilAccess = $this->access;
521  $tpl = $this->tpl;
522  $ilTabs = $this->tabs;
523  $ilCtrl = $this->ctrl;
524  $ilToolbar = $this->toolbar;
525  $lng = $this->lng;
526 
527  $ilCtrl->setParameter($this, "mep_mode", "listMedia");
528 
529  $this->checkPermission("read");
530 
531  $ilTabs->setTabActive("content");
532  $this->setContentSubTabs("content");
533 
534  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
535  $ilToolbar->addButton(
536  $lng->txt("mep_create_mob"),
537  $ilCtrl->getLinkTargetByClass("ilMediaCreationGUI", "")
538  );
539 
540  $mset = new ilSetting("mobs");
541  if ($mset->get("mep_activate_pages")) {
542  $ilToolbar->addButton(
543  $lng->txt("mep_create_content_snippet"),
544  $ilCtrl->getLinkTargetByClass(["ilobjmediapoolgui", "ilmediapoolpagegui"], "createMediaPoolPage")
545  );
546  }
547 
548  $ilToolbar->addButton(
549  $lng->txt("mep_create_folder"),
550  $ilCtrl->getLinkTarget($this, "createFolderForm")
551  );
552 
553  $ilToolbar->addButton(
554  $lng->txt("mep_bulk_upload"),
555  $ilCtrl->getLinkTarget($this, "bulkUpload")
556  );
557 
558  $move_ids = ilSession::get("mep_move_ids");
559  if (is_array($move_ids) && count($move_ids) > 0) {
560  $ilToolbar->addSeparator();
561  $ilToolbar->addButton(
562  $lng->txt("paste"),
563  $ilCtrl->getLinkTarget($this, "paste")
564  );
565  }
566  }
567 
568  $mep_table_gui = new ilMediaPoolTableGUI($this, "listMedia", $this->getMediaPool(), "mepitem_id");
569  $tpl->setContent($mep_table_gui->getHTML());
570  }
static get(string $a_var)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
ilToolbarGUI $toolbar
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
setContentSubTabs(string $a_active)
Set sub tabs for content tab.
TableGUI class for recent changes in wiki.
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ move()

ilObjMediaPoolGUI::move ( )
protected

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

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilSession\set().

1665  : void
1666  {
1667  ilSession::set("mep_move_ids", $this->mep_request->getItemIds());
1668  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("mep_move_select_insert"), true);
1669  $this->ctrl->redirect($this, "listMedia");
1670  }
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ onMobUpdate()

ilObjMediaPoolGUI::onMobUpdate ( int  $mob_id)
protected

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

Referenced by executeCommand().

1743  : void
1744  {
1745  }
+ Here is the caller graph for this function:

◆ openClipboard()

ilObjMediaPoolGUI::openClipboard ( )

paste from clipboard

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

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

860  : void
861  {
862  $ilCtrl = $this->ctrl;
863 
864  $this->checkPermission("write");
865 
866  $ilCtrl->setParameterByClass(
867  "ileditclipboardgui",
868  "returnCommand",
869  rawurlencode($ilCtrl->getLinkTarget(
870  $this,
871  "insertFromClipboard",
872  "",
873  false,
874  false
875  ))
876  );
877  $ilCtrl->redirectByClass("ilEditClipboardGUI", "getObject");
878  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ paste()

ilObjMediaPoolGUI::paste ( )
protected

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

References Vendor\Package\$e, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilMediaPoolItem\lookupType(), and ILIAS\Repository\object().

1672  : void
1673  {
1674  $target_folder_id = $this->mep_request->getItemId();
1675  $target_tree = $this->domain->tree($this->object->getId());
1676  if (ilMediaPoolItem::lookupType($target_folder_id) !== "fold") {
1677  $target_folder_id = $target_tree->readRootId();
1678  }
1679 
1680  try {
1681  $this->domain->mediapool($this->object->getId())->pasteFromClipboard($target_folder_id);
1682  } catch (Exception $e) {
1683  $this->main_tpl->setOnScreenMessage(
1684  'failure',
1685  $this->lng->txt("mep_target_in_source_not_allowed") . " " . $e->getMessage(),
1686  true
1687  );
1688  }
1689 
1690  $this->ctrl->redirect($this, "listMedia");
1691  }
static lookupType(int $a_id)
+ Here is the call graph for this function:

◆ performBulkUpload()

ilObjMediaPoolGUI::performBulkUpload ( )

Save bulk upload form.

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

References ilObject2GUI\checkPermission(), and ILIAS\Repository\ctrl().

1565  : void
1566  {
1567  $this->checkPermission("write");
1568  $this->ctrl->setParameter($this, "mep_hash", $this->mep_request->getUploadHash());
1569  $this->ctrl->redirect($this, "editTitlesAndDescriptions");
1570  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ remove()

ilObjMediaPoolGUI::remove ( )

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

References ilObjectGUI\$obj_id, ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

908  : void
909  {
910  $this->checkPermission("write");
911 
912  $ids = $this->mep_request->getItemIds();
913  foreach ($ids as $obj_id) {
914  $this->object->deleteChild($obj_id);
915  }
916 
917  $this->main_tpl->setOnScreenMessage('success', $this->lng->txt("cont_obj_removed"), true);
918  $this->ctrl->redirect($this, $this->mode);
919  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ resetFilter()

ilObjMediaPoolGUI::resetFilter ( )

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

References allMedia(), and ilMediaPoolTableGUI\IL_MEP_EDIT.

640  : void
641  {
642  $mtab = new ilMediaPoolTableGUI(
643  $this,
644  "allMedia",
645  $this->getMediaPool(),
646  "mepitem_id",
648  true
649  );
650  $mtab->resetFilter();
651  $mtab->resetOffset();
652  $this->allMedia();
653  }
allMedia()
list all media 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 479 of file class.ilObjMediaPoolGUI.php.

References ilObject2GUI\$ctrl, ilObjectGUI\$tree, ilObject2GUI\$type, ilTree\getParentId(), listMedia(), ilMediaPoolItem\lookupType(), ilCtrl\redirect(), and ilCtrl\setParameter().

479  : void
480  {
481  $ctrl = $this->ctrl;
482 
483  $type = ilMediaPoolItem::lookupType($this->mep_item_id);
484  if ($type !== "fold") {
485  $tree = $this->object->getTree();
486  $fold_id = $tree->getParentId($this->mep_item_id);
487  if ($fold_id > 0) {
488  $ctrl->setParameter($this, "mepitem_id", $fold_id);
489  $ctrl->redirect($this, "listMedia");
490  }
491  }
492  $this->listMedia();
493  }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
listMedia()
list media objects
getParentId(int $a_node_id)
get parent id of given node
static lookupType(int $a_id)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ saveFolder()

ilObjMediaPoolGUI::saveFolder ( )

Save folder form.

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, $mep_item_id, ilObject2GUI\$tpl, ilObject2GUI\checkPermission(), ILIAS\Repository\form(), initFolderForm(), ILIAS\Repository\object(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

1026  : void
1027  {
1028  $tpl = $this->tpl;
1029  $lng = $this->lng;
1030  $ilCtrl = $this->ctrl;
1031 
1032  $this->checkPermission("write");
1033 
1034  $this->initFolderForm("create");
1035  if ($this->form->checkInput()) {
1036  if ($this->object->createFolder($this->form->getInput("title"), $this->mep_item_id)) {
1037  $this->main_tpl->setOnScreenMessage('success', $lng->txt("mep_folder_created"), true);
1038  }
1039  $ilCtrl->redirect($this, "listMedia");
1040  }
1041 
1042  $this->form->setValuesByPost();
1043  $tpl->setContent($this->form->getHTML());
1044  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
form( $class_path, string $cmd, string $submit_caption="")
initFolderForm(string $a_mode="edit")
+ Here is the call graph for this function:

◆ saveTitlesAndDescriptions()

ilObjMediaPoolGUI::saveTitlesAndDescriptions ( )
protected

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilPropertyFormGUI\checkInput(), ilObject2GUI\checkPermission(), ilPropertyFormGUI\getInput(), ilMediaItem\getMediaItemsForUploadHash(), initMediaBulkForm(), ilCtrl\redirect(), and ilLanguage\txt().

1639  : void
1640  {
1641  $lng = $this->lng;
1642  $ctrl = $this->ctrl;
1643 
1644  $this->checkPermission("write");
1646  $this->mep_request->getUploadHash()
1647  );
1648 
1649  foreach ($media_items as $mi) {
1650  $mob = new ilObjMediaObject($mi["mob_id"]);
1651  $form = $this->initMediaBulkForm($mi["mob_id"], $mob->getTitle());
1652  $form->checkInput();
1653  $title = $form->getInput("title_" . $mi["mob_id"]);
1654  $desc = $form->getInput("description_" . $mi["mob_id"]);
1655  if (trim($title) !== "") {
1656  $mob->setTitle($title);
1657  }
1658  $mob->setDescription($desc);
1659  $mob->update();
1660  }
1661  $this->main_tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1662  $ctrl->redirect($this, "listMedia");
1663  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
static getMediaItemsForUploadHash(string $a_hash)
Get media items for upload hash.
initMediaBulkForm(int $a_id, string $a_title)
Init media bulk form.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ selectUploadDirFiles()

ilObjMediaPoolGUI::selectUploadDirFiles ( ?array  $a_files = null)

Select files from upload directory.

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, $tabs, ilObject2GUI\$toolbar, ilObject2GUI\$tpl, ilObject2GUI\checkPermission(), ILIAS\UICore\GlobalTemplate\setContent(), SYSTEM_FOLDER_ID, and ilLanguage\txt().

1340  : void {
1341  $tpl = $this->tpl;
1342  $ilTabs = $this->tabs;
1343  $lng = $this->lng;
1344  $ilCtrl = $this->ctrl;
1345  $ilToolbar = $this->toolbar;
1346 
1347 
1348  if (!$a_files) {
1349  $a_files = $this->mep_request->getFiles();
1350  }
1351 
1352  $ilTabs->clearTargets();
1353  $ilTabs->setBackTarget(
1354  $lng->txt("back"),
1355  $ilCtrl->getLinkTarget($this, "listMedia")
1356  );
1357 
1358  $this->checkPermission("write");
1359 
1360  if ($this->rbac_system->checkAccess("visible", SYSTEM_FOLDER_ID)) {
1361  $tb = new ilToolbarGUI();
1362  // action type
1363  $options = array(
1364  "rename" => $lng->txt("mep_up_dir_move"),
1365  "copy" => $lng->txt("mep_up_dir_copy"),
1366  );
1367  $si = new ilSelectInputGUI("", "action");
1368  $si->setOptions($options);
1369  $tb->addInputItem($si);
1370  $tb->setCloseFormTag(false);
1371  $tb->setFormAction($ilCtrl->getFormAction($this));
1372  $tb->setFormName("mep_up_form");
1373 
1374  $tab = new ilUploadDirFilesTableGUI(
1375  $this,
1376  "selectUploadDirFiles",
1377  $a_files
1378  );
1379  $tab->setFormName("mep_up_form");
1380  $tpl->setContent($tb->getHTML() . $tab->getHTML());
1381  }
1382  }
This class represents a selection list property in a property form.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
const SYSTEM_FOLDER_ID
Definition: constants.php:35
ilToolbarGUI $toolbar
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjMediaPoolGUI::setContentSubTabs ( string  $a_active)

Set sub tabs for content tab.

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

References ilObject2GUI\$access, ilObject2GUI\$ctrl, $tabs, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilCtrl\setParameter().

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

1129  : void {
1130  $ilAccess = $this->access;
1131  $ilTabs = $this->tabs;
1132  $ilCtrl = $this->ctrl;
1133 
1134  $ilTabs->addSubTab("content", $this->lng->txt("objs_fold"), $this->ctrl->getLinkTarget($this, ""));
1135 
1136  $ilCtrl->setParameter($this, "mepitem_id", "");
1137  $ilTabs->addSubTab("mep_all_mobs", $this->lng->txt("mep_all_mobs"), $this->ctrl->getLinkTarget($this, "allMedia"));
1138  $ilCtrl->setParameter($this, "mepitem_id", $this->mep_item_id);
1139 
1140  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
1141  $ilTabs->addSubTab(
1142  "srt_files",
1143  $this->lng->txt("mep_media_subtitles"),
1144  $ilCtrl->getLinkTargetByClass("ilmobmultisrtuploadgui", "")
1145  );
1146  }
1147 
1148  $ilTabs->activateSubTab($a_active);
1149  }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjMediaPoolGUI::setSettingsSubTabs ( string  $a_active)

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

References ilObject2GUI\$access, ilObject2GUI\$lng, $tabs, ILIAS\Repository\ctrl(), and ilLanguage\txt().

Referenced by executeCommand().

1232  : void {
1233  $ilTabs = $this->tabs;
1234  $lng = $this->lng;
1235  $ilAccess = $this->access;
1236 
1237  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1238  $ilTabs->addSubTab(
1239  "settings",
1240  $lng->txt("settings"),
1241  $this->ctrl->getLinkTarget($this, "edit")
1242  );
1243 
1244  $mset = new ilSetting("mobs");
1245  if ($mset->get("mep_activate_pages")) {
1246  $ilTabs->addSubTabTarget(
1247  "obj_multilinguality",
1248  $this->ctrl->getLinkTargetByClass(TranslationGUI::class, "")
1249  );
1250  }
1251  }
1252 
1253  $ilTabs->setSubTabActive($a_active);
1254  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjMediaPoolGUI::setTabs ( )
protected

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

References ilObject2GUI\$access, $help, $tabs, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilHelpGUI\setScreenIdComponent().

1151  : void
1152  {
1153  $ilAccess = $this->access;
1154  $ilTabs = $this->tabs;
1155  $ilHelp = $this->help;
1156 
1157  $ilHelp->setScreenIdComponent("mep");
1158 
1159  if ($ilAccess->checkAccess('read', '', $this->ref_id) ||
1160  $ilAccess->checkAccess('write', '', $this->ref_id)) {
1161  $ilTabs->addTab("content", $this->lng->txt("mep_content"), $this->ctrl->getLinkTarget($this, ""));
1162  }
1163 
1164  // info tab
1165  if ($ilAccess->checkAccess('visible', '', $this->ref_id) ||
1166  $ilAccess->checkAccess('read', '', $this->ref_id) ||
1167  $ilAccess->checkAccess('write', '', $this->ref_id)) {
1168  $ilTabs->addTab(
1169  "info_short",
1170  $this->lng->txt("info_short"),
1171  $this->ctrl->getLinkTargetByClass(
1172  array("ilobjmediapoolgui", "ilinfoscreengui"),
1173  "showSummary"
1174  )
1175  );
1176  }
1177 
1178  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1179  $ilTabs->addTab(
1180  "settings",
1181  $this->lng->txt("settings"),
1182  $this->ctrl->getLinkTargetByClass(SettingsGUI::class)
1183  );
1184  }
1185  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1186  $ilTabs->addTab(
1187  "clipboard",
1188  $this->lng->txt("clipboard"),
1189  $this->ctrl->getLinkTarget($this, "openClipboard")
1190  );
1191  }
1192 
1193  // properties
1194  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1195  // meta data
1196  $mdgui = new ilObjectMetaDataGUI($this->object, ['mob', "mpg"]);
1197  $mdtab = $mdgui->getTab();
1198  if ($mdtab) {
1199  $ilTabs->addTab(
1200  "meta_data",
1201  $this->lng->txt("meta_data"),
1202  $mdtab
1203  );
1204  }
1205  }
1206 
1207  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1208  $ilTabs->addTab(
1209  "export",
1210  $this->lng->txt("export"),
1211  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
1212  );
1213 
1214  $ilTabs->addTab(
1215  "import",
1216  $this->lng->txt("import"),
1217  $this->ctrl->getLinkTargetByClass("ilmediapoolimportgui", "")
1218  );
1219  }
1220 
1221  if ($ilAccess->checkAccess("edit_permission", "", $this->object->getRefId())) {
1222  $ilTabs->addTab(
1223  "perm_settings",
1224  $this->lng->txt("perm_settings"),
1225  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
1226  );
1227  }
1228  }
Class ilObjectMetaDataGUI.
setScreenIdComponent(string $a_comp)
ilAccessHandler $access
+ Here is the call graph for this function:

◆ showFullscreen()

ilObjMediaPoolGUI::showFullscreen ( )

show media fullscreen

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

References showMedia().

800  : void
801  {
802  $this->showMedia();
803  }
showMedia()
show media object
+ Here is the call graph for this function:

◆ showMedia()

ilObjMediaPoolGUI::showMedia ( )
protected

show media object

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

References $params, ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), ilFileUtils\getWebspaceDir(), IL_MODE_ALIAS, IL_MODE_OUTPUT, ilObjMediaObjectGUI\includePresentationJS(), and ilObjMediaObject\isTypeAllowed().

Referenced by showFullscreen(), and showPreview().

683  : void
684  {
685  $this->checkPermission("read");
686  $link_xml = "";
687  $pg_frame = "";
688 
689  $item = new ilMediaPoolItem($this->mep_item_id);
690  $mob_id = $item->getForeignId();
691 
692  $this->tpl = new ilGlobalTemplate("tpl.fullscreen.html", true, true, "components/ILIAS/COPage");
693  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
694  $this->tpl->setVariable(
695  "LOCATION_CONTENT_STYLESHEET",
697  );
698 
699 
701  $media_obj = new ilObjMediaObject($mob_id);
702 
703 
704  $this->tpl->setVariable("TITLE", " - " . $media_obj->getTitle());
705 
706  $xml = "<dummy>";
707  // todo: we get always the first alias now (problem if mob is used multiple
708  // times in page)
709  $xml .= $media_obj->getXML(IL_MODE_ALIAS);
710  $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
711  $xml .= $link_xml;
712  $xml .= "</dummy>";
713  $wb_path = ilFileUtils::getWebspaceDir("output") . "/";
714 
715  $mode = ($this->ctrl->getCmd() !== "showPreview")
716  ? "fullscreen"
717  : "media";
718  $enlarge_path = ilUtil::getImagePath("media/enlarge.svg", false, "output");
719  $fullscreen_link =
720  $this->ctrl->getLinkTarget($this, "showFullscreen", "", false, false);
721  $params = array('mode' => $mode, 'enlarge_path' => $enlarge_path,
722  'link_params' => "ref_id=" . $this->requested_ref_id,'fullscreen_link' => $fullscreen_link,
723  'enable_html_mob' => ilObjMediaObject::isTypeAllowed("html") ? "y" : "n",
724  'ref_id' => $this->requested_ref_id, 'pg_frame' => $pg_frame, 'webspace_path' => $wb_path);
725  $output = $this->xsl->process($xml, $params);
726 
727  // unmask user html
728  $this->tpl->setVariable("MEDIA_CONTENT", $output);
729  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
special template class to simplify handling of ITX/PEAR
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
static includePresentationJS(?ilGlobalTemplateInterface $a_tpl=null)
Include media object presentation JS.
static isTypeAllowed(string $a_type)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
const IL_MODE_ALIAS
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const IL_MODE_OUTPUT
+ 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 737 of file class.ilObjMediaPoolGUI.php.

References ilObject2GUI\$tpl, ILIAS\UICore\GlobalTemplate\addCss(), exit, ilObjStyleSheet\getContentStylePath(), getMediaPoolPageGUI(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), ILIAS\UICore\GlobalTemplate\printToStdout(), and ILIAS\UICore\GlobalTemplate\setVariable().

Referenced by showPreview().

737  : void
738  {
739  //$tpl = new \ilGlobalPageTemplate($DIC->globalScreen(), $DIC->ui(), $DIC->http());
740  $tpl = new ilGlobalTemplate("tpl.fullscreen.html", true, true, "components/ILIAS/COPage");
741 
745 
746  // get page object
747  $page_gui = $this->getMediaPoolPageGUI($this->mep_item_id);
748  $page_gui->setTemplate($tpl);
749 
750  $page_gui->setTemplateOutput(false);
751  $page_gui->setHeader("");
752  $ret = $page_gui->showPage(true);
753 
754  //$tpl->setBodyClass("ilMediaPoolPagePreviewBody");
755  $tpl->setVariable("MEDIA_CONTENT", "<div>" . $ret . "</div>");
756 
757 
758  $tpl->printToStdout();
759  exit;
760  }
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
special template class to simplify handling of ITX/PEAR
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilGlobalTemplateInterface $tpl
getMediaPoolPageGUI($mep_item_id, $old_nr=0)
Get media pool page.
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
exit
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ 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 779 of file class.ilObjMediaPoolGUI.php.

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

779  : void
780  {
781  $this->checkPermission("read");
782 
783  $item = new ilMediaPoolItem($this->mep_item_id);
784 
785  switch ($item->getType()) {
786  case "mob":
787  $this->showMedia();
788  break;
789 
790  case "pg":
791  $this->showPage();
792  break;
793  }
794  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showMedia()
show media object
+ Here is the call graph for this function:

◆ toggleExplorerNodeState()

ilObjMediaPoolGUI::toggleExplorerNodeState ( )
protected

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

572  : void
573  {
574  $exp = new ilMediaPoolExplorerGUI($this, "listMedia", $this->getMediaPool());
575  $exp->toggleExplorerNodeState();
576  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ updateFolder()

ilObjMediaPoolGUI::updateFolder ( )

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject2GUI\$tpl, ilObject2GUI\checkPermission(), ILIAS\Repository\form(), initFolderForm(), ILIAS\Repository\object(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

1046  : void
1047  {
1048  $lng = $this->lng;
1049  $ilCtrl = $this->ctrl;
1050  $tpl = $this->tpl;
1051 
1052  $this->checkPermission("write");
1053 
1054  $this->initFolderForm("edit");
1055  if ($this->form->checkInput()) {
1056  $item = new ilMediaPoolItem($this->mep_item_id);
1057  $item->setTitle($this->form->getInput("title"));
1058  $item->update();
1059  $this->main_tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1060  $ilCtrl->setParameter(
1061  $this,
1062  "mepitem_id",
1063  $this->object->getTree()->getParentId($this->mep_item_id)
1064  );
1065  $ilCtrl->redirect($this, "listMedia");
1066  }
1067 
1068  $this->form->setValuesByPost();
1069  $tpl->setContent($this->form->getHTML());
1070  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
form( $class_path, string $cmd, string $submit_caption="")
initFolderForm(string $a_mode="edit")
+ Here is the call graph for this function:

Field Documentation

◆ $bulk_upload_form

FormAdapterGUI ilObjMediaPoolGUI::$bulk_upload_form = null
protected

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

Referenced by getBulkUploadForm().

◆ $db

ilDBInterface ilObjMediaPoolGUI::$db
protected

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

◆ $domain

ILIAS MediaPool InternalDomainService ilObjMediaPoolGUI::$domain
protected

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

◆ $form

ilPropertyFormGUI ilObjMediaPoolGUI::$form
protected

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

Referenced by initMediaBulkForm().

◆ $gui

InternalGUIService ilObjMediaPoolGUI::$gui
protected

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

◆ $help

ilHelpGUI ilObjMediaPoolGUI::$help
protected

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

Referenced by setTabs().

◆ $main_tpl

ilGlobalTemplateInterface ilObjMediaPoolGUI::$main_tpl
protected

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

Referenced by bulkUpload(), and editTitlesAndDescriptions().

◆ $mep_item_id

int ilObjMediaPoolGUI::$mep_item_id = 0
protected

◆ $mep_log

ilLogger ilObjMediaPoolGUI::$mep_log
protected

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

◆ $mep_request

StandardGUIRequest ilObjMediaPoolGUI::$mep_request
protected

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

◆ $mode

string ilObjMediaPoolGUI::$mode
protected

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

◆ $output_prepared

bool ilObjMediaPoolGUI::$output_prepared

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

◆ $tabs

ilTabsGUI ilObjMediaPoolGUI::$tabs
protected

◆ $upload

FileUpload ilObjMediaPoolGUI::$upload
protected

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

◆ $xsl

ILIAS COPage Xsl XslManager ilObjMediaPoolGUI::$xsl
protected

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


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