本文整理汇总了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;
}
示例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;
}
示例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');
示例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');