當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Helpers::getAppParam方法代碼示例

本文整理匯總了PHP中Helpers::getAppParam方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helpers::getAppParam方法的具體用法?PHP Helpers::getAppParam怎麽用?PHP Helpers::getAppParam使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Helpers的用法示例。


在下文中一共展示了Helpers::getAppParam方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getParam

 public function getParam($paramName)
 {
     if ($paramName == 'fromEmail' || $paramName == 'adminEmail') {
         $value = Helpers::getAppParam($paramName);
     } else {
         $value = Yii::app()->controller->module->{$paramName};
     }
     return $value;
 }
開發者ID:jasonhai,項目名稱:yii1.1-user-auth-module,代碼行數:9,代碼來源:AuthCommon.php

示例2: saveModel

 public function saveModel()
 {
     $dt = new DateTime();
     $curDate = $dt->format(Helpers::getAppParam('dateFormat'));
     if ($this->scenario == 'generate') {
         $this->date_issued = $curDate;
     } elseif ($this->scenario == 'use') {
         $this->date_occuped = $curDate;
     }
     if (!$this->save()) {
         return false;
     }
     return true;
 }
開發者ID:jasonhai,項目名稱:yii1.1-user-auth-module,代碼行數:14,代碼來源:Invitations.php

示例3: array

$buttonLabel = Yii::t('AuthModule.forms', 'Login. Submit button');
if (!$isAjax) {
    $formRender->submitButton($buttonLabel);
} else {
    $url = $this->createUrl('login');
    $formRender->ajaxSubmitPanel($buttonLabel, $url);
}
$formRender->endForm();
?>
   
<?php 
echo '<span class="col-sm-2"></span>';
echo CHtml::link(Yii::t('AuthModule.forms', 'Login. Restore password'), array('user/passrequest'));
echo '<span class="margin-right-mid"></span>';
echo CHtml::link(Yii::t('AuthModule.forms', 'Login. Register user'), array('user/registration'));
$allowSocial = Helpers::getAppParam('allowSocialServices');
if ($allowSocial) {
    echo '<hr>';
    echo '<div class="nojs-hide">';
    if ($isAjax) {
        $socialLoginLabel = '';
    } else {
        $socialLoginLabel = Yii::t('AuthModule.forms', 'Social login');
    }
    echo '<span class="col-sm-2 align-right">' . $socialLoginLabel . '</span>';
    AuthCommon::renderExtAccountWindowJS();
    AuthCommon::renderSocialLogin('facebook');
    echo '<span class="margin-right-mid"></span>';
    AuthCommon::renderSocialLogin('google');
    echo '<span class="margin-right-mid"></span>';
    AuthCommon::renderSocialLogin('vkontakte');
開發者ID:jasonhai,項目名稱:yii1.1-user-auth-module,代碼行數:31,代碼來源:login.php

示例4: catch

<?php

$this->pageTitle = "Введите приглашение";
?>
<p>
В данное время регистрация новых пользователей производится по приглашениям (инвайтам).
</p>
<p>Если у вас нет приглашения, то его можно запросить, написав письмо на адрес:
    <?php 
try {
    $email = Helpers::getAppParam('adminEmail');
} catch (Exception $ex) {
    $email = AuthCommon::getParam('adminEmail');
}
echo CHtml::mailto($email, $email);
?>
</p>

<div class="margin-bottom-30"></div>
<div class="row">
    <div class="table-responsive col-md-5">
    <?php 
$formRender = new FormElements($this, $model);
$formRender->fieldClass = "col-sm-8";
$formRender->labelClass = "col-sm-3";
$formRender->submitOffcet = "col-sm-offset-3";
$formRender->startForm();
$formRender->showErrors();
$formRender->textField('guid', '', '', false);
if ($model->scenario == 'withCaptcha') {
    $formRender->capthaField('verifyCode');
開發者ID:jasonhai,項目名稱:yii1.1-user-auth-module,代碼行數:31,代碼來源:index.php


注:本文中的Helpers::getAppParam方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。