当前位置: 首页>>代码示例>>PHP>>正文


PHP ilObjMediaObject::_getSimpleMimeTypes方法代码示例

本文整理汇总了PHP中ilObjMediaObject::_getSimpleMimeTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjMediaObject::_getSimpleMimeTypes方法的具体用法?PHP ilObjMediaObject::_getSimpleMimeTypes怎么用?PHP ilObjMediaObject::_getSimpleMimeTypes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilObjMediaObject的用法示例。


在下文中一共展示了ilObjMediaObject::_getSimpleMimeTypes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initAliasForm

 /**
  * Init alias form
  */
 function initAliasForm()
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form_gui = new ilPropertyFormGUI();
     // standard view resource
     $std_alias_item =& new ilMediaAliasItem($this->dom, $this->getHierId(), "Standard", $this->content_obj->getPcId());
     $std_item = $this->content_obj->getMediaObject()->getMediaItem("Standard");
     // title, location and format
     $title = new ilNonEditableValueGUI($lng->txt("title"), "title");
     $this->form_gui->addItem($title);
     $loc = new ilNonEditableValueGUI($this->lng->txt("cont_" . strtolower($std_item->getLocationType())), "st_location");
     $this->form_gui->addItem($loc);
     $format = new ilNonEditableValueGUI($this->lng->txt("cont_format"), "st_format");
     $this->form_gui->addItem($format);
     // standard size
     $radio_size = new ilRadioGroupInputGUI($lng->txt("size"), "st_derive_size");
     $op1 = new ilRadioOption($lng->txt("cont_default") . " (" . $std_item->getWidth() . " x " . $std_item->getHeight() . ")", "y");
     $op2 = new ilRadioOption($lng->txt("cont_custom"), "n");
     $radio_size->addOption($op1);
     // width height
     include_once "./Services/MediaObjects/classes/class.ilWidthHeightInputGUI.php";
     $width_height = new ilWidthHeightInputGUI($lng->txt("cont_width") . " / " . $lng->txt("cont_height"), "st_width_height");
     $width_height->setConstrainProportions(true);
     $op2->addSubItem($width_height);
     $radio_size->addOption($op2);
     $this->form_gui->addItem($radio_size);
     // standard caption
     $rad_caption = new ilRadioGroupInputGUI($lng->txt("cont_caption"), "st_derive_caption");
     $op1 = new ilRadioOption($lng->txt("cont_default"), "y");
     $def_cap = new ilNonEditableValueGUI("", "def_caption");
     $op1->addSubItem($def_cap);
     $op2 = new ilRadioOption($lng->txt("cont_custom"), "n");
     $rad_caption->addOption($op1);
     $caption = new ilTextAreaInputGUI("", "st_caption");
     $caption->setCols(30);
     $caption->setRows(2);
     $op2->addSubItem($caption);
     /*$caption = new ilTextInputGUI("", "st_caption");
     		$caption->setSize(40);
     		$caption->setMaxLength(200);
     		$op2->addSubItem($caption);*/
     $rad_caption->addOption($op2);
     $this->form_gui->addItem($rad_caption);
     // standard text representation
     if (substr($std_item->getFormat(), 0, 5) == "image") {
         $rad_tr = new ilRadioGroupInputGUI($lng->txt("text_repr"), "st_derive_text_representation");
         $op1 = new ilRadioOption($lng->txt("cont_default"), "y");
         $def_tr = new ilNonEditableValueGUI("", "def_text_representation");
         $op1->addSubItem($def_tr);
         $op2 = new ilRadioOption($lng->txt("cont_custom"), "n");
         $tr = new ilTextAreaInputGUI("", "st_text_representation");
         $tr->setCols(30);
         $tr->setRows(2);
         $rad_tr->addOption($op1);
         $op2->addSubItem($tr);
         $rad_tr->addOption($op2);
         $this->form_gui->addItem($rad_tr);
         $rad_tr->setInfo($lng->txt("text_repr_info"));
     }
     // standard parameters
     if (!in_array($std_item->getFormat(), ilObjMediaObject::_getSimpleMimeTypes())) {
         if (ilObjMediaObject::_useAutoStartParameterOnly($std_item->getLocation(), $std_item->getFormat())) {
             $par = $std_item->getParameters();
             $def_str = $par["autostart"] == "true" ? " (" . $lng->txt("yes") . ")" : " (" . $lng->txt("no") . ")";
             $rad_auto = new ilRadioGroupInputGUI($lng->txt("cont_autostart"), "st_derive_parameters");
             $op1 = new ilRadioOption($lng->txt("cont_default") . $def_str, "y");
             $rad_auto->addOption($op1);
             $op2 = new ilRadioOption($lng->txt("cont_custom"), "n");
             $auto = new ilCheckboxInputGUI($lng->txt("enabled"), "st_autostart");
             $op2->addSubItem($auto);
             $rad_auto->addOption($op2);
             $this->form_gui->addItem($rad_auto);
         } else {
             $rad_parameters = new ilRadioGroupInputGUI($lng->txt("cont_parameter"), "st_derive_parameters");
             $op1 = new ilRadioOption($lng->txt("cont_default"), "y");
             $def_par = new ilNonEditableValueGUI("", "def_parameters");
             $op1->addSubItem($def_par);
             $rad_parameters->addOption($op1);
             $op2 = new ilRadioOption($lng->txt("cont_custom"), "n");
             $par = new ilTextAreaInputGUI("", "st_parameters");
             $par->setRows(5);
             $par->setCols(50);
             $op2->addSubItem($par);
             $rad_parameters->addOption($op2);
             $this->form_gui->addItem($rad_parameters);
         }
     }
     // fullscreen view
     if ($this->content_obj->getMediaObject()->hasFullScreenItem()) {
         $full_alias_item =& new ilMediaAliasItem($this->dom, $this->getHierId(), "Fullscreen", $this->content_obj->getPcId());
         $full_item = $this->content_obj->getMediaObject()->getMediaItem("Fullscreen");
         $fs_sec = new ilFormSectionHeaderGUI();
         $fs_sec->setTitle($lng->txt("cont_fullscreen"));
         $this->form_gui->addItem($fs_sec);
         // resource
         $radio_prop = new ilRadioGroupInputGUI($lng->txt("cont_resource"), "fullscreen");
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilPCMediaObjectGUI.php

示例2: getTabs

 /**
  * Get Tabs
  */
 function getTabs(&$tabs_gui)
 {
     global $ilTabs, $ilHelp;
     $ilHelp->setScreenIdComponent("mob");
     //$tabs_gui->setTargetScript($this->ctrl->getLinkTarget($this));
     if (is_object($this->object) && strtolower(get_class($this->object)) == "ilobjmediaobject" && $this->object->getId() > 0) {
         // object properties
         $ilTabs->addTarget("cont_mob_def_prop", $this->ctrl->getLinkTarget($this, "edit"), "edit", get_class($this));
         $st_item =& $this->object->getMediaItem("Standard");
         // video tools
         if (substr($st_item->getFormat(), 0, 6) == "video/" && DEVMODE) {
             $ilTabs->addTarget("mob_video_tools", $this->ctrl->getLinkTargetByClass("ilobjmediaobjectgui", "showVideoTool"), "showVideoTool", "ilobjmediaobjectgui");
         }
         // link areas
         if (is_object($st_item) && $this->getEnabledMapAreas()) {
             $format = $st_item->getFormat();
             if (substr($format, 0, 5) == "image") {
                 $ilTabs->addTarget("cont_def_map_areas", $this->ctrl->getLinkTargetByClass(array("ilobjmediaobjectgui", "ilimagemapeditorgui"), "editMapAreas"), "editMapAreas", "ilimagemapeditorgui");
             }
         }
         // object usages
         $ilTabs->addTarget("cont_mob_usages", $this->ctrl->getLinkTarget($this, "showUsages"), "showUsages", get_class($this));
         // object files
         $std_item = $this->object->getMediaItem("Standard");
         $full_item = $this->object->getMediaItem("Fullscreen");
         $mset = new ilSetting("mobs");
         if ($mset->get("file_manager_always") || (!in_array($std_item->getFormat(), ilObjMediaObject::_getSimpleMimeTypes()) || is_object($full_item) && !in_array($full_item->getFormat(), ilObjMediaObject::_getSimpleMimeTypes()))) {
             //				$ilTabs->addTarget("cont_files",
             //					$this->ctrl->getLinkTarget($this, "editFiles"), "editFiles",
             //					get_class($this));
             $ilTabs->addTarget("cont_files", $this->ctrl->getLinkTargetByClass(array("ilobjmediaobjectgui", "ilfilesystemgui"), "listFiles"), "", "ilfilesystemgui");
         }
         $ilTabs->addTarget("meta_data", $this->ctrl->getLinkTargetByClass(array("ilobjmediaobjectgui", "ilmdeditorgui"), 'listSection'), "", "ilmdeditorgui");
     }
     // back to upper context
     if ($this->back_title != "") {
         $tabs_gui->setBackTarget($this->back_title, $this->ctrl->getParentReturn($this));
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:42,代码来源:class.ilObjMediaObjectGUI.php


注:本文中的ilObjMediaObject::_getSimpleMimeTypes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。