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


PHP ilLanguage::getLangKey方法代码示例

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


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

示例1: setUp

 /**
  *
  */
 public function setUp()
 {
     vfsStreamWrapper::register();
     $root = vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
     $customizing_dir = vfsStream::newDirectory('Customizing')->at($root);
     $this->client_dir = vfsStream::newDirectory('clients/default/agreement')->at($customizing_dir);
     $this->global_dir = vfsStream::newDirectory('global/agreement')->at($customizing_dir);
     $this->lng = $this->getMockBuilder('ilLanguage')->disableOriginalConstructor()->getMock();
     $this->lng->expects($this->any())->method('getLangKey')->will($this->returnValue('de'));
     $this->lng->expects($this->any())->method('getDefaultLanguage')->will($this->returnValue('fr'));
     $this->source_files = array(vfsStream::url(implode('/', array('root', 'Customizing', 'clients', 'default', 'agreement', 'agreement_' . $this->lng->getLangKey() . '.html'))) => $this->lng->getLangKey(), vfsStream::url(implode('/', array('root', 'Customizing', 'clients', 'default', 'agreement', 'agreement_' . $this->lng->getDefaultLanguage() . '.html'))) => $this->lng->getDefaultLanguage(), vfsStream::url(implode('/', array('root', 'Customizing', 'clients', 'default', 'agreement', 'agreement_en.html'))) => 'en', vfsStream::url(implode('/', array('root', 'Customizing', 'global', 'agreement', 'agreement_' . $this->lng->getLangKey() . '.html'))) => $this->lng->getLangKey(), vfsStream::url(implode('/', array('root', 'Customizing', 'global', 'agreement', 'agreement_' . $this->lng->getDefaultLanguage() . '.html'))) => $this->lng->getDefaultLanguage(), vfsStream::url(implode('/', array('root', 'Customizing', 'global', 'agreement', 'agreement_en.html'))) => 'en');
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:ilTermsOfServiceFileSystemDocumentTest.php

示例2: sendUsernameAssistanceMail

 /**
  * Creates (or reuses) a password assistance session, and sends a password
  * assistance mail to the specified user.
  * Note: To prevent DOS attacks, a new session is created only, if no session
  * exists, or if the existing session has been expired.
  * The password assistance mail contains an URL, which points to this script
  * and contains the following URL parameters:
  * client_id
  * key
  * @param $email
  * @param $logins
  */
 public function sendUsernameAssistanceMail($email, array $logins)
 {
     require_once 'Services/Mail/classes/class.ilMailbox.php';
     require_once 'Services/Mail/classes/class.ilMimeMail.php';
     require_once 'include/inc.pwassist_session_handler.php';
     $protocol = $this->https->isDetected() ? 'https://' : 'http://';
     $server_url = $protocol . $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')) . '/';
     $login_url = $server_url . 'pwassist.php' . '?client_id=' . $this->ilias->getClientId() . '&lang=' . $this->lng->getLangKey();
     $contact_address = $this->settings->get('admin_email');
     $mm = new ilMimeMail();
     $mm->Subject($this->lng->txt('pwassist_mail_subject'));
     $mm->From($contact_address);
     $mm->To($email);
     $mm->Body(str_replace(array("\\n", "\\t"), array("\n", "\t"), sprintf($this->lng->txt('pwassist_username_mail_body'), join($logins, ",\n"), $server_url, $_SERVER['REMOTE_ADDR'], $email, 'mailto:' . $contact_address, $login_url)));
     $mm->Send();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:28,代码来源:class.ilPasswordAssistanceGUI.php


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