本文整理汇总了PHP中ilCtrl::getCmd方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCtrl::getCmd方法的具体用法?PHP ilCtrl::getCmd怎么用?PHP ilCtrl::getCmd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilCtrl
的用法示例。
在下文中一共展示了ilCtrl::getCmd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeCommand
/**
* execute command
*/
public function executeCommand()
{
global $ilCtrl;
$ilCtrl->saveParameter($this, 'mode');
$cmd = $this->ctrl->getCmd();
switch ($cmd) {
case 'listRecords':
$this->setSubTabs();
$this->listRecords();
break;
case 'confirmDeleteRecords':
$this->confirmDeleteRecords();
break;
case 'cancelDelete':
$this->setSubTabs();
$this->listRecords();
break;
case 'deleteRecords':
$this->deleteRecords();
break;
default:
$this->{$cmd}();
break;
}
}
示例2: executeCommand
/**
* execute command
*/
public function executeCommand()
{
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
switch ($next_class) {
default:
return $this->dispatchCommand($cmd);
}
}
示例3: executeCommand
/**
* @return bool
* @throws Exception
* @throws ilCtrlException
* @throws ilException
*/
public function executeCommand()
{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch ($next_class) {
case 'ilrepositorysearchgui':
switch ($cmd) {
case 'addUserFromAutoComplete':
if ($_GET['addusertype'] == "staff") {
$this->addStaff();
} elseif ($_GET['addusertype'] == "other") {
$this->addOtherRoles();
}
break;
default:
$repo = new ilRepositorySearchGUI();
$this->ctrl->forwardCommand($repo);
break;
}
break;
default:
switch ($cmd) {
case 'showStaff':
$this->tabs_gui->activateSubTab("show_staff");
$this->showStaff();
break;
case 'showOtherRoles':
$this->tabs_gui->activateSubTab("show_other_roles");
$this->showOtherRoles();
break;
case 'showStaffRec':
$this->tabs_gui->activateSubTab("show_staff_rec");
$this->showStaffRec();
break;
case 'confirmRemoveFromRole':
case 'confirmRemoveFromEmployees':
case 'confirmRemoveFromSuperiors':
$this->confirmRemoveUser($cmd);
break;
case 'addStaff':
case 'addOtherRoles':
case 'fromSuperiorToEmployee':
case 'fromEmployeeToSuperior':
case 'removeFromSuperiors':
case 'removeFromEmployees':
case 'removeFromRole':
$this->{$cmd}();
break;
default:
throw new ilException("Unknown command for command class ilOrgUnitStaffGUI: " . $cmd);
break;
}
break;
}
return true;
}
示例4: switch
/**
* execute command
*/
function &executeCommand()
{
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->getCommand($cmd);
switch ($next_class) {
default:
$ret =& $this->{$cmd}();
break;
}
return $ret;
}
示例5: executeCommand
public function executeCommand()
{
switch ($this->myCtrl->getNextClass()) {
case strtolower(__CLASS__):
case '':
$command = $this->myCtrl->getCmd(self::CMD_SHOW) . 'Cmd';
$this->{$command}();
break;
default:
throw new ilTestQuestionPoolException('unsupported next class');
}
}
示例6: executeCommand
public function executeCommand()
{
$forward_class = $this->ctrl->getNextClass($this);
switch ($forward_class) {
default:
if (!($cmd = $this->ctrl->getCmd())) {
$cmd = 'showAttachments';
}
$this->{$cmd}();
break;
}
return true;
}
示例7: executeCommand
/**
* @return bool
*/
public function executeCommand()
{
$cmd = $this->ctrl->getCmd();
switch ($cmd) {
case 'importScreen':
$this->importScreen();
break;
case 'startImport':
$this->startImport();
break;
}
return true;
}
示例8: executeCommand
/**
* @return bool
*/
public function executeCommand()
{
$cmd = $this->ctrl->getCmd();
switch ($cmd) {
case "assignRoles":
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
default:
$this->{$cmd}();
break;
}
return true;
}
示例9: executeCommand
public function executeCommand()
{
$this->ctrl->saveParameter($this, 'nextCommand');
$nextCommand = explode('::', $_GET['nextCommand']);
$this->setNextCommandClass($nextCommand[0]);
$this->setNextCommandCmd($nextCommand[1]);
$this->ctrl->saveParameter($this->parentGUI, 'lock');
switch ($this->ctrl->getNextClass()) {
default:
$cmd = $this->ctrl->getCmd() . 'Cmd';
$this->{$cmd}();
}
}
示例10: executeCommand
/**
* execute command
*/
public function executeCommand()
{
$setting = new ilSetting('assessment');
if (!(bool) $setting->get('assessment_adjustments_enabled', false)) {
$this->ctrl->redirectByClass('ilObjTestGUI');
}
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
switch ($next_class) {
default:
return $this->dispatchCommand($cmd);
}
}
示例11: executeCommand
/**
* @return bool
*/
public function executeCommand()
{
$cmd = $this->ctrl->getCmd();
switch ($cmd) {
case 'edit':
$this->edit();
break;
case 'update':
$this->update();
break;
}
return true;
}
示例12: executeCommand
/**
* execute command
*/
public function executeCommand()
{
$cmd = $this->ctrl->getCmd();
$this->tpl->getStandardTemplate();
switch ($cmd) {
case 'update':
$this->save("update");
break;
default:
$this->{$cmd}();
break;
}
return true;
}
示例13: executeCommand
public function executeCommand()
{
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
switch ($next_class) {
case '':
switch ($cmd) {
case '':
case 'listTypes':
$this->listTypes();
break;
case 'add':
$this->add();
break;
case 'edit':
$this->setSubTabsEdit('general');
$this->edit();
break;
case 'editCustomIcons':
$this->setSubTabsEdit('custom_icons');
$this->editCustomIcons();
break;
case 'editAMD':
$this->setSubTabsEdit('amd');
$this->editAMD();
break;
case 'updateAMD':
$this->setSubTabsEdit('amd');
$this->updateAMD();
break;
case 'updateCustomIcons':
$this->setSubTabsEdit('custom_icons');
$this->updateCustomIcons();
break;
case 'create':
$this->create();
break;
case 'update':
$this->setSubTabsEdit('general');
$this->update();
break;
case 'delete':
$this->delete();
break;
}
break;
}
}
示例14: executeCommand
/**
* @return mixed
*/
public function executeCommand()
{
// check hack attempts
if (!$this->settings->get('password_assistance')) {
if (empty($_SESSION['AccountId']) && $_SESSION['AccountId'] !== false) {
$this->ilias->error_obj->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->WARNING);
}
}
// check correct setup
if (!$this->settings->get('setup_ok')) {
die('Setup is not completed. Please run setup routine again.');
}
// Change the language, if necessary.
// And load the 'pwassist' language module
$lang = $_GET['lang'];
if ($lang != null && $lang != '' && $this->lng->getLangKey() != $lang) {
$lng = new ilLanguage($lang);
}
$this->lng->loadLanguageModule('pwassist');
$cmd = $this->ctrl->getCmd();
$next_class = $this->ctrl->getNextClass($this);
switch ($next_class) {
default:
if ($cmd != '') {
return $this->{$cmd}();
} else {
if (!empty($_GET['key'])) {
$this->showAssignPasswordForm();
} else {
$this->showAssistanceForm();
}
}
break;
}
}
示例15: setSubTabsSettings
/**
* @param $active_tab_id
*/
protected function setSubTabsSettings($active_tab_id)
{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->tabs_gui->addSubTab('edit_settings', $this->lng->txt('settings'), $this->ctrl->getLinkTarget($this, 'editSettings'));
$this->tabs_gui->addSubTab("edit_translations", $this->lng->txt("obj_multilinguality"), $this->ctrl->getLinkTargetByClass("iltranslationgui", "editTranslations"));
$ilOrgUnitType = $this->object->getOrgUnitType();
if ($ilOrgUnitType instanceof ilOrgUnitType) {
if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) {
$this->tabs_gui->addSubTab('edit_advanced_settings', $this->lng->txt('orgu_adv_settings'), $this->ctrl->getLinkTarget($this, 'editAdvancedSettings'));
}
}
$this->tabs_gui->setSubTabActive($active_tab_id);
switch ($next_class) {
case 'iltranslationgui':
$this->tabs_gui->setSubTabActive("edit_translations");
break;
case '':
switch ($cmd) {
case 'editSettings':
$this->tabs_gui->setSubTabActive('edit_settings');
break;
case 'editAdvancedSettings':
case 'updateAdvancedSettings':
$this->tabs_gui->setSubTabActive('edit_advanced_settings');
break;
}
break;
}
return;
}