本文整理汇总了PHP中ilCtrl::saveParameterByClass方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCtrl::saveParameterByClass方法的具体用法?PHP ilCtrl::saveParameterByClass怎么用?PHP ilCtrl::saveParameterByClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilCtrl
的用法示例。
在下文中一共展示了ilCtrl::saveParameterByClass方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: modifyGUI
/**
* Modify GUI objects, before they generate ouput
*
* @param string $a_comp component
* @param string $a_part string that identifies the part of the UI that is handled
* @param string $a_par array of parameters (depend on $a_comp and $a_part)
*/
function modifyGUI($a_comp, $a_part, $contextElements = array())
{
// currently only implemented for $ilTabsGUI
// Zeigt an, in welchem Modul man sich gerade in ILIAS befindet
/*
if ($part == "tabs") {
var_dump($this->ctrl->getCalHistory());
}
/**/
// tabs hook
// note that you currently do not get information in $a_comp
// here. So you need to use general GET/POST information
// like $_GET["baseClass"], $ilCtrl->getCmdClass/getCmd
// to determine the context.
//if ($a_part == "tabs")
if ($a_part == "tabs" && $this->isINCourseGUI()) {
// $a_par["tabs"] is ilTabsGUI object
/** @var ilTabsGUI $tabs */
$tabs = $contextElements["tabs"];
$this->ctrl->saveParameterByClass('ilCourseEmailSubscriptionGUI', 'ref_id');
// saveparameterbyclass behält Einstellungsvariablen (ref_id) auch bei neuem Link
$tabs->addTab('courseSubscription', 'Mitglieder Einschreiben', $this->ctrl->getLinkTargetByClass(array('ilUIPluginRouterGUI', 'ilCourseEmailSubscriptionGUI'), 'show'));
//$tabs->addTab('test', 'test', 'test');
/*
$tabs = $contextElements["tabs"];
$this->ctrl->saveParameterByClass('ilUIExampleUIHookGUI', 'ref_id');
$tabs->addTab('courseSubscription', 'Mitglieder Einschreiben', $this->ctrl->getLinkTargetByClass(array('ilUIPluginRouterGUI', 'ilUIExampleUIHookGUI'), 'show'));
*/
}
}
示例2: buildHeader
/**
* @param $ilLocator
*/
protected function buildHeader($ilLocator)
{
$this->tpl->setTitle($this->courseObject->getTitle());
// Der Titel des Kurses
$this->tpl->setDescription($this->courseObject->getDescription());
// Die Beschreibung des Kurses
$this->tpl->setTitleIcon(ilObject::_getIcon($this->courseObject->getId(), 'big'));
// Das Bild soll des Kurses
// Wir fügen einen Zurückknopf ein. Dieser soll die Members des Kurses anzeigen
$this->ctrl->saveParameterByClass('ilObjCourseGUI', 'ref_id');
//Wir müssen die ref_id speichern, damit der Link zum richtigen Kurs zeigt
$this->tabs->setBackTarget('Zurück', $this->ctrl->getLinkTargetByClass(array('ilRepositoryGUI', 'ilObjCourseGUI'), 'members'));
// Wir fügen in den folgenden zwei Zeilen den Locator hinzu. (Breadcrumbs über dem Titel).
$ilLocator->addRepositoryItems($this->courseObject->getRefId());
$this->tpl->setLocator($ilLocator->getHTML());
}
开发者ID:any333,项目名称:courseEmailsSubscriptionPlugin,代码行数:19,代码来源:class.ilCourseEmailSubscriptionGUI.php
示例3: executeCommand
public function executeCommand()
{
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
parent::prepareOutput();
$this->showTree();
switch ($next_class) {
case "illocalusergui":
$this->tabs_gui->setTabActive('administrate_users');
$ilLocalUserGUI = new ilLocalUserGUI($this);
$this->ctrl->forwardCommand($ilLocalUserGUI);
break;
case "ilextidgui":
$this->tabs_gui->setTabActive("settings");
$this->setSubTabsSettings();
$ilExtIdGUI = new ilExtIdGUI($this);
$this->ctrl->forwardCommand($ilExtIdGUI);
break;
case "ilorgunitsimpleimportgui":
$this->tabs_gui->setTabActive("view_content");
$ilOrgUnitSimpleImportGUI = new ilOrgUnitSimpleImportGUI($this);
$this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
break;
case "ilorgunitsimpleuserimportgui":
$this->tabs_gui->setTabActive("view_content");
$ilOrgUnitSimpleUserImportGUI = new ilOrgUnitSimpleUserImportGUI($this);
$this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
break;
case "ilorgunitstaffgui":
case "ilrepositorysearchgui":
$this->tabs_gui->setTabActive('orgu_staff');
$ilOrgUnitStaffGUI = new ilOrgUnitStaffGUI($this);
$this->ctrl->forwardCommand($ilOrgUnitStaffGUI);
break;
case "ilobjusergui":
switch ($cmd) {
case "create":
$ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['ref_id'], true, false);
$ilObjUserGUI->setCreationMode(true);
$this->ctrl->forwardCommand($ilObjUserGUI);
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
break;
case "view":
case "update":
$ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['obj_id'], false, false);
$ilObjUserGUI->setCreationMode(false);
$this->ctrl->forwardCommand($ilObjUserGUI);
break;
case "cancel":
$this->ctrl->redirectByClass("illocalusergui", "index");
break;
}
break;
case "ilobjuserfoldergui":
$ilObjUserFolderGUI = new ilObjUserFolderGUI("", (int) $_GET['ref_id'], true, false);
$ilObjUserFolderGUI->setUserOwnerId((int) $_GET['ref_id']);
$ilObjUserFolderGUI->setCreationMode(true);
$this->ctrl->forwardCommand($ilObjUserFolderGUI);
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
break;
case "ilinfoscreengui":
$this->tabs_gui->setTabActive("info_short");
if (!$this->ilAccess->checkAccess("visible", "", $this->ref_id)) {
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
}
$info = new ilInfoScreenGUI($this);
$this->ctrl->forwardCommand($info);
break;
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
$ilPermissionGUI = new ilPermissionGUI($this);
$this->ctrl->forwardCommand($ilPermissionGUI);
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
case 'illearningprogressgui':
case 'illplistofprogressgui':
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt('backto_staff'), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", 'showStaff'));
if (!ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->object->getRefid(), $_GET['obj_id'])) {
ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
$this->ctrl->redirectByClass("ilOrgUnitStaffGUI", "showStaff");
}
$this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id");
$this->ctrl->saveParameterByClass("illearningprogressgui", "recursive");
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_USER_FOLDER, USER_FOLDER_ID, $_GET["obj_id"]);
$this->ctrl->forwardCommand($new_gui);
break;
case 'ilorgunitexportgui':
$this->tabs_gui->setTabActive('export');
$ilOrgUnitExportGUI = new ilOrgUnitExportGUI($this);
//.........这里部分代码省略.........
示例4: executeCommand
//.........这里部分代码省略.........
if (!$this->ilAccess->checkAccess("read", "", $this->ref_id) and !$this->ilAccess->checkAccess("visible", "", $this->ref_id)) {
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
}
$info = new ilInfoScreenGUI($this);
$this->parseInfoScreen($info);
$this->ctrl->forwardCommand($info);
// I guess this is how it was supposed to work, but it doesn't... it won't respect our sub-id and sub-type when creating the objects!
// So we reimplemented the stuff in the method parseInfoScreen()
// $info = new ilInfoScreenGUI($this);
// $amd_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
// $amd_gui->setInfoObject($info);
// $amd_gui->setSelectedOnly(true);
// $amd_gui->parse();
// $this->ctrl->forwardCommand($info);
break;
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
$ilPermissionGUI = new ilPermissionGUI($this);
$this->ctrl->forwardCommand($ilPermissionGUI);
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
case 'illearningprogressgui':
case 'illplistofprogressgui':
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt('backto_staff'), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", 'showStaff'));
if (!ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->object->getRefid(), $_GET['obj_id'])) {
ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
$this->ctrl->redirectByClass("ilOrgUnitStaffGUI", "showStaff");
}
$this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id");
$this->ctrl->saveParameterByClass("illearningprogressgui", "recursive");
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_ORG_UNIT, $_GET["ref_id"], $_GET['obj_id']);
$this->ctrl->forwardCommand($new_gui);
break;
case 'ilorgunitexportgui':
$this->tabs_gui->setTabActive('export');
$ilOrgUnitExportGUI = new ilOrgUnitExportGUI($this);
$ilOrgUnitExportGUI->addFormat('xml');
$this->ctrl->forwardCommand($ilOrgUnitExportGUI);
break;
case 'iltranslationgui':
$this->tabs_gui->setTabActive("settings");
$this->setSubTabsSettings('edit_translations');
$ilTranslationGui = new ilTranslationGUI($this);
$this->ctrl->forwardCommand($ilTranslationGui);
break;
case 'ilorgunittypegui':
$this->tabs_gui->setTabActive('orgu_types');
$types_gui = new ilOrgUnitTypeGUI($this);
$this->ctrl->forwardCommand($types_gui);
break;
default:
switch ($cmd) {
case '':
case 'view':
case 'render':
case 'cancel':
case 'cancelDelete':
$this->view();
break;
case 'performPaste':