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


PHP ilInfoScreenGUI::addButton方法代码示例

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


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

示例1: switch

 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilAccess, $ilTabs, $ilErr;
     if (strtolower($_GET["baseClass"]) == "iladministrationgui" || $this->getCreationMode() == true) {
         $this->prepareOutput();
     } else {
         $this->getTemplate();
         $this->setLocator();
         $this->setTabs();
     }
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case 'ilmdeditorgui':
             if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
                 $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
             }
             include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
             $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
             $md_gui->addObserver($this->object, 'MDUpdateListener', 'General');
             $this->ctrl->forwardCommand($md_gui);
             break;
         case 'ilpermissiongui':
             include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
             $perm_gui =& new ilPermissionGUI($this);
             $ret =& $this->ctrl->forwardCommand($perm_gui);
             break;
         case "ilfilesystemgui":
             $this->fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
             $this->fs_gui->setTableId("sahsfs" . $this->object->getId());
             $ret =& $this->ctrl->forwardCommand($this->fs_gui);
             break;
         case "ilcertificategui":
             include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
             include_once "./Modules/ScormAicc/classes/class.ilSCORMCertificateAdapter.php";
             $output_gui = new ilCertificateGUI(new ilSCORMCertificateAdapter($this->object));
             $ret =& $this->ctrl->forwardCommand($output_gui);
             break;
         case "illearningprogressgui":
             include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
             $new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY, $this->object->getRefId());
             $this->ctrl->forwardCommand($new_gui);
             break;
         case 'illicensegui':
             include_once "./Services/License/classes/class.ilLicenseGUI.php";
             $license_gui =& new ilLicenseGUI($this);
             $ret =& $this->ctrl->forwardCommand($license_gui);
             break;
         case "ilinfoscreengui":
             include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
             $info = new ilInfoScreenGUI($this);
             $info->enablePrivateNotes();
             $info->enableLearningProgress();
             // add read / back button
             if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
                 if (!$this->object->getEditable()) {
                     $info->addButton($this->lng->txt("view"), "ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=" . $this->object->getRefID(), ' target="ilContObj' . $this->object->getId() . '" ');
                 }
             }
             $info->enableNews();
             if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
                 $info->enableNewsEditing();
                 $news_set = new ilSetting("news");
                 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
                 if ($enable_internal_rss) {
                     $info->setBlockProperty("news", "settings", true);
                 }
             }
             // show standard meta data section
             $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
             // forward the command
             $this->ctrl->forwardCommand($info);
             break;
         case "ilcommonactiondispatchergui":
             include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
             $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
             $this->ctrl->forwardCommand($gui);
             break;
         case "ilobjstylesheetgui":
             //$this->addLocations();
             $this->ctrl->setReturn($this, "properties");
             $ilTabs->clearTargets();
             $style_gui =& new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
             $style_gui->omitLocator();
             if ($cmd == "create" || $_GET["new_type"] == "sty") {
                 $style_gui->setCreationMode(true);
             }
             //$ret =& $style_gui->executeCommand();
             if ($cmd == "confirmedDelete") {
                 $this->object->setStyleSheetId(0);
                 $this->object->update();
             }
             $ret =& $this->ctrl->forwardCommand($style_gui);
             if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
                 $style_id = $ret;
                 $this->object->setStyleSheetId($style_id);
                 $this->object->update();
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilObjSAHSLearningModuleGUI.php

示例2: infoScreen

 /**
  * show info screen
  */
 public function infoScreen()
 {
     global $ilErr, $ilUser, $ilTabs;
     if (!$this->checkPermissionBool('visible')) {
         $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
     }
     $ilTabs->activateTab('info');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     if ($ilUser->getId() == ANONYMOUS_USER_ID || $this->object->isLocalObject()) {
         $info->addButton($this->lng->txt($this->getType() . '_call'), $this->object->getRemoteLink(), 'target="_blank"');
     } else {
         $info->addButton($this->lng->txt($this->getType() . '_call'), $this->ctrl->getLinkTarget($this, 'call'), 'target="_blank"');
     }
     $info->addSection($this->lng->txt('ecs_general_info'));
     $info->addProperty($this->lng->txt('title'), $this->object->getTitle());
     if (strlen($this->object->getOrganization())) {
         $info->addProperty($this->lng->txt('organization'), $this->object->getOrganization());
     }
     if (strlen($this->object->getDescription())) {
         $info->addProperty($this->lng->txt('description'), $this->object->getDescription());
     }
     if (strlen($loc = $this->object->getLocalInformation())) {
         $info->addProperty($this->lng->txt('ecs_local_information'), $this->object->getLocalInformation());
     }
     $this->addCustomInfoFields($info);
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
     $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, $this->getType(), $this->object->getId());
     $record_gui->setInfoObject($info);
     $record_gui->parse();
     $this->ctrl->forwardCommand($info);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:35,代码来源:class.ilRemoteObjectBaseGUI.php

示例3: outputInfoScreen

 /**
  * info screen
  */
 function outputInfoScreen($a_standard_locator = true)
 {
     global $ilBench, $ilLocator, $ilAccess, $ilTabs;
     $ilTabs->activateTab('id_info');
     $this->lng->loadLanguageModule("meta");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     $info->enableLearningProgress();
     $info->enableNews();
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $info->enableNewsEditing();
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
         }
     }
     // add read / back button
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $info->addButton($this->lng->txt("view"), "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefID(), ' target="ilContObj' . $this->object->getId() . '" ');
     }
     // show standard meta data section
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     // forward the command
     $this->ctrl->forwardCommand($info);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:30,代码来源:class.ilObjFileBasedLMGUI.php

示例4: infoScreen

 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess, $ilUser, $ilTabs, $lng;
     $ilTabs->activateTab("info_short");
     if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     if (trim($this->object->getIntroduction()) != "") {
         $info->addSection($lng->txt("wiki_introduction"));
         $info->addProperty("", nl2br($this->object->getIntroduction()));
     }
     // feedback from tutor; mark, status, comment
     include_once "./Modules/Wiki/classes/class.ilWikiContributor.php";
     include_once "./Services/Tracking/classes/class.ilLPMarks.php";
     $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
     $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
     $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
     if ($lpcomment != "" || $mark != "" || $status != ilWikiContributor::STATUS_NOT_GRADED) {
         $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
         if ($lpcomment != "") {
             $info->addProperty($this->lng->txt("wiki_comment"), $lpcomment);
         }
         if ($mark != "") {
             $info->addProperty($this->lng->txt("wiki_mark"), $mark);
         }
         if ($status == ilWikiContributor::STATUS_PASSED) {
             $info->addProperty($this->lng->txt("status"), $this->lng->txt("wiki_passed"));
         }
         if ($status == ilWikiContributor::STATUS_FAILED) {
             $info->addProperty($this->lng->txt("status"), $this->lng->txt("wiki_failed"));
         }
     }
     /*
     		$info->enableNews();
     		if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
     		{
     			//$info->enableNewsEditing();
     			$info->setBlockProperty("news", "settings", true);
     		}*/
     if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
         $info->addButton($lng->txt("wiki_start_page"), ilObjWikiGUI::getGotoLink($this->object->getRefId()));
     }
     // general information
     $this->lng->loadLanguageModule("meta");
     $this->lng->loadLanguageModule("wiki");
     //$info->addSection($this->lng->txt("meta_general"));
     //$info->addProperty($this->lng->txt("mcst_nr_items"),
     //	(int) count($med_items));
     // forward the command
     $this->ctrl->forwardCommand($info);
     if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
         //			$this->setSideBlock();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:60,代码来源:class.ilObjWikiGUI.php

示例5: outputInfoScreen

 /**
  * info screen
  */
 function outputInfoScreen()
 {
     global $ilAccess;
     //$this->tpl->setHeaderPageTitle("PAGETITLE", " - ".$this->lm->getTitle());
     // set style sheets
     /*
     		if (!$this->offlineMode())
     		{
     			$this->tpl->setStyleSheetLocation(ilUtil::getStyleSheetLocation());
     		}
     		else
     		{
     			$style_name = $this->ilias->account->prefs["style"].".css";;
     			$this->tpl->setStyleSheetLocation("./".$style_name);
     		}*/
     $this->setInfoTabs("info_short");
     $this->lng->loadLanguageModule("meta");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this->slm_gui);
     $info->enablePrivateNotes();
     //$info->enableLearningProgress();
     $info->enableNews();
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $info->enableNewsEditing();
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
         }
     }
     // add read / back button
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         include_once './Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
         $sahs_obj = new ilObjSAHSLearningModule($_GET["ref_id"]);
         $om = $sahs_obj->getOpenMode();
         $width = $sahs_obj->getWidth();
         $height = $sahs_obj->getHeight();
         if ($om != 0) {
             $info->addButton($this->lng->txt("view"), "javascript:void(0); onclick=startSAHS('" . $this->ctrl->getLinkTarget($this, "") . "','ilContObj" . $this->slm_gui->object->getId() . "'," . $om . "," . $width . "," . $height . ");", '');
         } else {
             $info->addButton($this->lng->txt("view"), $this->ctrl->getLinkTarget($this, ""), ' target="ilContObj' . $this->slm_gui->object->getId() . '" ');
         }
     }
     // show standard meta data section
     $info->addMetaDataSections($this->slm_gui->object->getId(), 0, $this->slm_gui->object->getType());
     /*
     		if ($this->offlineMode())
     		{
     			$this->tpl->setContent($info->getHTML());
     			return $this->tpl->get();
     		}
     		else
     		{*/
     // forward the command
     $this->ctrl->forwardCommand($info);
     //$this->tpl->setContent("aa");
     $this->tpl->show();
     //}
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:62,代码来源:class.ilSAHSPresentationGUI.php

示例6: infoScreenForward

 /**
  * show information screen
  */
 function infoScreenForward()
 {
     global $ilTabs, $ilErr;
     $ilTabs->activateTab("id_info");
     if (!$this->checkPermissionBool("visible")) {
         $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     if ($this->checkPermissionBool("read", "sendfile")) {
         // 9876
         $this->lng->loadLanguageModule("file");
         $info->addButton($this->lng->txt("file_download"), $this->ctrl->getLinkTarget($this, "sendfile"));
     }
     $info->enablePrivateNotes();
     if ($this->checkPermissionBool("read")) {
         $info->enableNews();
     }
     // no news editing for files, just notifications
     $info->enableNewsEditing(false);
     if ($this->checkPermissionBool("write")) {
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
             $info->setBlockProperty("news", "public_notifications_option", true);
         }
     }
     // standard meta data
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     $info->addSection($this->lng->txt("file_info"));
     $info->addProperty($this->lng->txt("filename"), $this->object->getFileName());
     // BEGIN WebDAV Guess file type.
     $info->addProperty($this->lng->txt("type"), $this->object->guessFileType());
     // END WebDAV Guess file type.
     $info->addProperty($this->lng->txt("size"), ilFormat::formatSize(ilObjFile::_lookupFileSize($this->object->getId()), 'long'));
     $info->addProperty($this->lng->txt("version"), $this->object->getVersion());
     include_once "./Services/History/classes/class.ilHistory.php";
     $uploader = ilHistory::_getEntriesForObject($this->object->getId(), $this->object->getType());
     $uploader = array_shift($uploader);
     $uploader = $uploader["user_id"];
     $this->lng->loadLanguageModule("file");
     include_once "Services/User/classes/class.ilUserUtil.php";
     $info->addProperty($this->lng->txt("file_uploaded_by"), ilUserUtil::getNamePresentation($uploader));
     if ($this->id_type == self::WORKSPACE_NODE_ID) {
         $info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
     }
     // forward the command
     // $this->ctrl->setCmd("showSummary");
     // $this->ctrl->setCmdClass("ilinfoscreengui");
     $this->ctrl->forwardCommand($info);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:55,代码来源:class.ilObjFileGUI.php

示例7: infoScreenForward

 /**
  * show information screen
  */
 function infoScreenForward()
 {
     global $ilTabs, $ilErr;
     $ilTabs->activateTab("id_info");
     if (!$this->checkPermissionBool("visible")) {
         $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     if ($this->checkPermissionBool("read", "sendfile")) {
         // 9876
         $this->lng->loadLanguageModule("file");
         // get permanent download link for repository
         if ($this->id_type == self::REPOSITORY_NODE_ID) {
             $info->addButton($this->lng->txt("file_download"), ilObjFileAccess::_getPermanentDownloadLink($this->node_id), "", "top", true);
         } else {
             $info->addButton($this->lng->txt("file_download"), $this->ctrl->getLinkTarget($this, "sendfile"), "", "top", true);
         }
     }
     $info->enablePrivateNotes();
     if ($this->checkPermissionBool("read")) {
         $info->enableNews();
     }
     // no news editing for files, just notifications
     $info->enableNewsEditing(false);
     if ($this->checkPermissionBool("write")) {
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
             $info->setBlockProperty("news", "public_notifications_option", true);
         }
     }
     // standard meta data
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     $info->addSection($this->lng->txt("file_info"));
     $info->addProperty($this->lng->txt("filename"), $this->object->getFileName());
     // BEGIN WebDAV Guess file type.
     $info->addProperty($this->lng->txt("type"), $this->object->guessFileType());
     // END WebDAV Guess file type.
     $info->addProperty($this->lng->txt("size"), ilFormat::formatSize(ilObjFile::_lookupFileSize($this->object->getId()), 'long'));
     $info->addProperty($this->lng->txt("version"), $this->object->getVersion());
     // using getVersions function instead of ilHistory direct
     $uploader = $this->object->getVersions();
     $uploader = array_shift($uploader);
     $uploader = $uploader["user_id"];
     $this->lng->loadLanguageModule("file");
     include_once "Services/User/classes/class.ilUserUtil.php";
     $info->addProperty($this->lng->txt("file_uploaded_by"), ilUserUtil::getNamePresentation($uploader));
     // download link added in repository
     if ($this->id_type == self::REPOSITORY_NODE_ID && $this->checkPermissionBool("read", "sendfile")) {
         $tpl = new ilTemplate("tpl.download_link.html", true, true, "Modules/File");
         $tpl->setVariable("LINK", ilObjFileAccess::_getPermanentDownloadLink($this->node_id));
         $info->addProperty($this->lng->txt("download_link"), $tpl->get());
     }
     if ($this->id_type == self::WORKSPACE_NODE_ID) {
         $info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
     }
     // display previews
     include_once "./Services/Preview/classes/class.ilPreview.php";
     if (!$this->ctrl->isAsynch() && ilPreview::hasPreview($this->object->getId(), $this->object->getType()) && $this->checkPermissionBool("read")) {
         include_once "./Services/Preview/classes/class.ilPreviewGUI.php";
         // get context for access checks later on
         $context;
         switch ($this->id_type) {
             case self::WORKSPACE_NODE_ID:
             case self::WORKSPACE_OBJECT_ID:
                 $context = ilPreviewGUI::CONTEXT_WORKSPACE;
                 break;
             default:
                 $context = ilPreviewGUI::CONTEXT_REPOSITORY;
                 break;
         }
         $preview = new ilPreviewGUI($this->node_id, $context, $this->object->getId(), $this->access_handler);
         $info->addProperty($this->lng->txt("preview"), $preview->getInlineHTML());
     }
     // forward the command
     // $this->ctrl->setCmd("showSummary");
     // $this->ctrl->setCmdClass("ilinfoscreengui");
     $this->ctrl->forwardCommand($info);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:84,代码来源:class.ilObjFileGUI.php

示例8: infoScreen

 /**
  * show info screen
  *
  * @access public
  */
 public function infoScreen()
 {
     global $ilCtrl;
     $this->tabs_gui->activateTab('infoScreen');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->addSection($this->txt('xxco_instructions'));
     $info->addProperty("", $this->object->getInstructions());
     // meta data
     $xml_obj = $this->object->fetchMetaData(self::META_TIMEOUT_INFO);
     if ($xml_obj) {
         foreach ($xml_obj->group as $group) {
             if (in_array($group['name'], $this->meta_groups)) {
                 $info->addSection(utf8_decode($group->title));
                 foreach ($group->fields->field as $field) {
                     $info->addProperty(utf8_decode($field->title), $field->content);
                 }
             }
         }
     }
     $info->enablePrivateNotes();
     // add view button
     if ($this->object->typedef->getAvailability() == ilExternalContentType::AVAILABILITY_NONE) {
         ilUtil::sendFailure($this->lng->txt('xxco_message_type_not_available'), false);
     } elseif ($this->object->getOnline()) {
         if ($this->object->typedef->getLaunchType() == ilExternalContentType::LAUNCH_TYPE_LINK) {
             $info->addButton($this->lng->txt("view"), $ilCtrl->getLinkTarget($this, "view"));
         } elseif ($this->object->typedef->getLaunchType() == ilExternalContentType::LAUNCH_TYPE_PAGE) {
             $info->addButton($this->lng->txt("view"), $ilCtrl->getLinkTarget($this, "viewPage"));
         }
     }
     $ilCtrl->forwardCommand($info);
 }
开发者ID:ilifau,项目名称:ExternalContent,代码行数:38,代码来源:class.ilObjExternalContentGUI.php


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