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


PHP ilLanguage::loadLanguageModule方法代码示例

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


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

示例1: 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;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:38,代码来源:class.ilPasswordAssistanceGUI.php

示例2: __construct

 public function __construct(ilCtrl $ctrl, ilLanguage $lng, ilObjTest $testOBJ, ilTestRandomQuestionSetConfigGUI $questionSetConfigGUI, ilTestRandomQuestionSetConfig $questionSetConfig)
 {
     $this->ctrl = $ctrl;
     $this->lng = $lng;
     // Bugfix for mantis: 0015081
     $this->lng->loadLanguageModule('form');
     $this->testOBJ = $testOBJ;
     $this->questionSetConfigGUI = $questionSetConfigGUI;
     $this->questionSetConfig = $questionSetConfig;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilTestRandomQuestionSetGeneralConfigFormGUI.php

示例3: __construct

 /**
  *
  * @param
  *
  * @return \ilAuthShibbolethSettingsGUI
  */
 public function __construct($a_auth_ref_id)
 {
     global $lng, $ilCtrl, $tpl, $ilTabs, $ilias;
     $this->ctrl = $ilCtrl;
     $this->tabs_gui = $ilTabs;
     $this->lng = $lng;
     $this->lng->loadLanguageModule('shib');
     $this->ilias = $ilias;
     $this->tpl = $tpl;
     $this->ref_id = $a_auth_ref_id;
     $this->obj_id = ilObject::_lookupObjId($this->ref_id);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilAuthShibbolethSettingsGUI.php

示例4:

 function __construct($parent_gui)
 {
     global $tpl, $ilCtrl, $ilTabs, $ilToolbar, $lng, $rbacsystem, $ilAccess;
     $this->tpl = $tpl;
     $this->ctrl = $ilCtrl;
     $this->parent_gui = $parent_gui;
     $this->object = $parent_gui->object;
     $this->tabs_gui = $this->parent_gui->tabs_gui;
     $this->toolbar = $ilToolbar;
     $this->lng = $lng;
     $this->ilAccess = $ilAccess;
     $this->lng->loadLanguageModule('user');
     if (!$rbacsystem->checkAccess("cat_administrate_users", $this->parent_gui->object->getRefId())) {
         ilUtil::sendFailure($this->lng->txt("msg_no_perm_admin_users"), true);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilLocalUserGUI.php

示例5: showUnitsOfCategory

 /**
  *
  */
 protected function showUnitsOfCategory()
 {
     /**
      * @var $ilToolbar ilToolbarGUI
      */
     global $ilToolbar;
     $category = $this->getCategoryById((int) $_GET['category_id'], false);
     $this->tpl->addJavaScript("./Services/JavaScript/js/Basic.js");
     $this->tpl->addJavaScript("./Services/Form/js/Form.js");
     $this->lng->loadLanguageModule('form');
     require_once 'Modules/TestQuestionPool/classes/tables/class.ilUnitTableGUI.php';
     $ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, $this->getUnitCategoryOverviewCommand()));
     if ($this->isCRUDContext()) {
         $ilToolbar->addButton($this->lng->txt('un_add_unit'), $this->ctrl->getLinkTarget($this, 'showUnitCreationForm'));
     }
     $table = new ilUnitTableGUI($this, 'showUnitsOfCategory', $category);
     $units = $this->repository->loadUnitsForCategory($category->getId());
     $data = array();
     foreach ($units as $unit) {
         /**
          * @var $unit assFormulaQuestionUnit
          */
         $data[] = array('unit_id' => $unit->getId(), 'unit' => $unit->getUnit(), 'baseunit' => $unit->getBaseunitTitle(), 'baseunit_id' => $unit->getBaseUnit(), 'factor' => $unit->getFactor(), 'sequence' => $unit->getSequence());
     }
     $table->setData($data);
     $this->tpl->setContent($table->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilUnitConfigurationGUI.php

示例6:

 /**
  * @param $parent_gui
  */
 function __construct($parent_gui)
 {
     global $tpl, $ilCtrl, $ilTabs, $ilToolbar, $lng, $ilAccess;
     $this->tpl = $tpl;
     $this->ctrl = $ilCtrl;
     $this->parent_gui = $parent_gui;
     $this->parent_object = $parent_gui->object;
     $this->tabs_gui = $this->parent_gui->tabs_gui;
     $this->toolbar = $ilToolbar;
     $this->lng = $lng;
     $this->ilAccess = $ilAccess;
     $this->lng->loadLanguageModule('user');
     if (!$this->ilAccess->checkaccess("write", "", $this->parent_gui->object->getRefId())) {
         ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:19,代码来源:class.ilOrgUnitSimpleImportGUI.php

示例7: __construct

 /**
  * @param ilObjOrgUnitGUI $parent_gui
  */
 public function __construct(ilObjOrgUnitGUI $parent_gui)
 {
     global $tpl, $ilCtrl, $ilAccess, $ilToolbar, $ilLocator, $tree, $lng, $ilLog, $ilias, $ilTabs;
     $this->tpl = $tpl;
     $this->ctrl = $ilCtrl;
     $this->access = $ilAccess;
     $this->locator = $ilLocator;
     $this->toolbar = $ilToolbar;
     $this->tabs = $ilTabs;
     $this->log = $ilLog;
     $this->lng = $lng;
     $this->ilias = $ilias;
     $this->parent_gui = $parent_gui;
     $this->lng->loadLanguageModule('orgu');
     $this->ctrl->saveParameter($this, 'type_id');
     $this->lng->loadLanguageModule('meta');
     $this->checkAccess();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:21,代码来源:class.ilOrgUnitTypeGUI.php

示例8: __construct

 public function __construct()
 {
     global $tpl, $ilCtrl, $ilToolbar, $ilTabs, $lng, $ilAccess, $ilDB, $ilLocator;
     $this->ctrl = $ilCtrl;
     $this->tpl = $tpl;
     $this->toolbar = $ilToolbar;
     $this->tabs = $ilTabs;
     $this->ref_id = (int) $_GET['ref_id'];
     $this->crs = ilObjectFactory::getInstanceByRefId($this->ref_id);
     $this->definition = srCertificateDefinition::where(array('ref_id' => $this->ref_id))->first();
     $this->pl = ilCertificatePlugin::getInstance();
     $this->lng = $lng;
     $this->access = $ilAccess;
     $this->db = $ilDB;
     $this->ctrl->saveParameter($this, 'ref_id');
     $this->tpl->addJavaScript($this->pl->getStyleSheetLocation('uihk_certificate.js'));
     $this->lng->loadLanguageModule('common');
     $ilLocator->addRepositoryItems();
     $this->tpl->setVariable("LOCATOR", $ilLocator->getHTML());
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:20,代码来源:class.srCertificateDefinitionGUI.php

示例9: __construct

 public function __construct()
 {
     /**
      * @var $ilCtrl   ilCtrl
      * @var $tpl      ilTemplate
      * @var $lng      ilLanguage
      * @var $ilTabs   ilTabsGUI
      * @var $ilAccess ilAccessHandler
      * @var $ilias    ilias
      *  */
     global $ilCtrl, $tpl, $lng, $ilTabs, $ilAccess, $ilias;
     $this->ctrl = $ilCtrl;
     $this->tpl = $tpl;
     $this->lng = $lng;
     $ilTabs->setTabActive('frm_moderators');
     $this->lng->loadLanguageModule('search');
     if (!$ilAccess->checkAccess('write', '', (int) $_GET['ref_id'])) {
         $ilias->raiseError($this->lng->txt('permission_denied'), $ilias->error_obj->MESSAGE);
     }
     $this->oForumModerators = new ilForumModerators((int) $_GET['ref_id']);
     $this->ref_id = (int) $_GET['ref_id'];
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:22,代码来源:class.ilForumModeratorsGUI.php

示例10: editTranslations

 public function editTranslations($a_get_post_values = false, $a_add = false)
 {
     $this->lng->loadLanguageModule($this->ilObjectOrgUnit->getType());
     $table = new ilObjectTranslationTableGUI($this, "editTranslations", true, "Translation");
     if ($a_get_post_values) {
         $vals = array();
         foreach ($_POST["title"] as $k => $v) {
             $vals[] = array("title" => $v, "desc" => $_POST["desc"][$k], "lang" => $_POST["lang"][$k], "default" => $_POST["default"] == $k);
         }
         $table->setData($vals);
     } else {
         $data = $this->ilObjectOrgUnit->getTranslations();
         foreach ($data["Fobject"] as $k => $v) {
             $data["Fobject"][$k]["default"] = $k == $data["default_language"];
         }
         if ($a_add) {
             $data["Fobject"][++$k]["title"] = "";
         }
         $table->setData($data["Fobject"]);
     }
     $this->tpl->setContent($table->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:22,代码来源:class.ilTranslationGUI.php

示例11: showAcceptanceHistory

 /**
  *
  */
 protected function showAcceptanceHistory()
 {
     /**
      * @var $rbacsystem  ilRbacSystem
      * @var $ilErr       ilErrorHandling
      * @var $tpl         ilTemplate
      */
     global $rbacsystem, $ilErr, $tpl;
     if (!$rbacsystem->checkAccess('read', '', $this->object->getRefId()) || !$rbacsystem->checkAccess('read', '', USER_FOLDER_ID)) {
         $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
     }
     $this->lng->loadLanguageModule('meta');
     $table = new ilTermsOfServiceAcceptanceHistoryTableGUI($this, 'showAcceptanceHistory');
     $table->setProvider($this->factory->getByContext(ilTermsOfServiceTableDataProviderFactory::CONTEXT_ACCEPTANCE_HISTORY));
     $table->populate();
     $tpl->setContent($table->getHtml());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:20,代码来源:class.ilObjTermsOfServiceGUI.php

示例12: __construct

 public function __construct()
 {
     global $tpl, $ilCtrl, $ilToolbar, $ilTabs, $lng, $ilAccess, $ilDB, $rbacreview, $ilUser;
     /** @var ilCtrl ctrl */
     $this->ctrl = $ilCtrl;
     $this->tpl = $tpl;
     $this->toolbar = $ilToolbar;
     $this->tabs = $ilTabs;
     $this->type = isset($_GET['type_id']) ? srCertificateType::find((int) $_GET['type_id']) : null;
     $this->pl = ilCertificatePlugin::getInstance();
     $this->lng = $lng;
     $this->access = $ilAccess;
     $this->db = $ilDB;
     $this->tpl->addJavaScript($this->pl->getStyleSheetLocation('uihk_certificate.js'));
     $this->lng->loadLanguageModule('common');
     $this->tpl->setTitleIcon(ilCertificatePlugin::getPluginIconImage());
     $this->rbac = $rbacreview;
     $this->user = $ilUser;
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:19,代码来源:class.srCertificateTypeGUI.php

示例13: die

 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilias, $lng, $ilSetting, $ilErr, $ilAuth;
     // check hack attempts
     if (!$ilSetting->get("password_assistance")) {
         if (empty($_SESSION["AccountId"]) and $_SESSION["AccountId"] !== false) {
             $ilErr->raiseError($lng->txt("permission_denied"), $ilias->error_obj->WARNING);
         }
     }
     // check correct setup
     if (!$ilSetting->get("setup_ok")) {
         die("Setup is not completed. Please run setup routine again. (pwassist.php)");
     }
     // Change the language, if necessary.
     // And load the 'pwassist' language module
     $lang = $_GET['lang'];
     if ($lang != null && $lang != "" && $lng->getLangKey() != $lang) {
         $lng = new ilLanguage($lang);
     }
     $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;
     }
     // Logout current session
     //$ilAuth->logout();
     //session_destroy();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:42,代码来源:class.ilPasswordAssistanceGUI.php

示例14: executeCommand

 public function executeCommand()
 {
     $this->tabs->setTabActive(self::TAB_ID_QUESTION_PREVIEW);
     $this->lng->loadLanguageModule('content');
     $nextClass = $this->ctrl->getNextClass($this);
     switch ($nextClass) {
         case 'ilassquestionhintrequestgui':
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
             $gui = new ilAssQuestionHintRequestGUI($this, self::CMD_SHOW, $this->questionGUI, $this->hintTracking);
             $this->ctrl->forwardCommand($gui);
             break;
         case 'ilassspecfeedbackpagegui':
         case 'ilassgenfeedbackpagegui':
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackPageObjectCommandForwarder.php';
             $forwarder = new ilAssQuestionFeedbackPageObjectCommandForwarder($this->questionOBJ, $this->ctrl, $this->tabs, $this->lng);
             $forwarder->forward();
             break;
         default:
             $cmd = $this->ctrl->getCmd(self::CMD_SHOW) . 'Cmd';
             $this->{$cmd}();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:22,代码来源:class.ilAssQuestionPreviewGUI.php

示例15: addAvailabilityProperties

 /**
  * @param ilPropertyFormGUI $form
  */
 private function addAvailabilityProperties(ilPropertyFormGUI $form)
 {
     include_once "Services/Object/classes/class.ilObjectActivation.php";
     $this->lng->loadLanguageModule('rep');
     $section = new ilFormSectionHeaderGUI();
     $section->setTitle($this->lng->txt('rep_activation_availability'));
     $form->addItem($section);
     // additional info only with multiple references
     $act_obj_info = $act_ref_info = "";
     if (sizeof(ilObject::_getAllReferences($this->testOBJ->getId())) > 1) {
         $act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
         $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
     }
     $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
     $online->setChecked($this->testOBJ->isOnline());
     $online->setInfo($this->lng->txt('tst_activation_online_info') . $act_obj_info);
     $form->addItem($online);
     $act_type = new ilCheckboxInputGUI($this->lng->txt('rep_visibility_until'), 'activation_type');
     $act_type->setChecked($this->testOBJ->isActivationLimited());
     // $act_type->setInfo($this->lng->txt('tst_availability_until_info'));
     $this->tpl->addJavaScript('./Services/Form/js/date_duration.js');
     include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
     $dur = new ilDateDurationInputGUI($this->lng->txt("rep_time_period"), "access_period");
     $dur->setShowTime(true);
     $date = $this->testOBJ->getActivationStartingTime();
     $dur->setStart(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
     $dur->setStartText($this->lng->txt('rep_activation_limited_start'));
     $date = $this->testOBJ->getActivationEndingTime();
     $dur->setEnd(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
     $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
     $act_type->addSubItem($dur);
     $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'activation_visibility');
     $visible->setInfo($this->lng->txt('tst_activation_limited_visibility_info'));
     $visible->setChecked($this->testOBJ->getActivationVisibility());
     $act_type->addSubItem($visible);
     $form->addItem($act_type);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:40,代码来源:class.ilObjTestSettingsGeneralGUI.php


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