本文整理汇总了PHP中humhub\models\Setting::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::get方法的具体用法?PHP Setting::get怎么用?PHP Setting::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类humhub\models\Setting
的用法示例。
在下文中一共展示了Setting::get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* @inheritdoc
*/
public function init()
{
parent::init();
$this->trigger(self::EVENT_ON_INIT);
if ($this->isDatabaseInstalled()) {
$baseUrl = Setting::get('baseUrl');
Yii::setAlias("@web", $baseUrl);
$this->urlManager->scriptUrl = $baseUrl;
}
}
示例2: run
?>
</div>
<div class="panel-body">
<?php
$currentUser = '';
if (function_exists('get_current_user')) {
$currentUser = get_current_user();
}
?>
<p>
<strong>Status:</strong><br/>
<?php
$lastRunHourly = Setting::get('cronLastHourlyRun');
$lastRunDaily = Setting::get('cronLastDailyRun');
if ($lastRunHourly == "") {
$lastRunHourly = "<span style='color:red'>" . Yii::t('AdminModule.views_setting_cronjob', 'Never') . "</span>";
} else {
$lastRunHourly = \humhub\widgets\TimeAgo::widget(['timestamp' => $lastRunHourly]);
}
if ($lastRunDaily == "") {
$lastRunDaily = "<span style='color:red'>" . Yii::t('AdminModule.views_setting_cronjob', 'Never') . "</span>";
} else {
$lastRunDaily = \humhub\widgets\TimeAgo::widget(['timestamp' => $lastRunDaily]);
}
?>
<?php
echo Yii::t('AdminModule.views_setting_cronjob', 'Last run (hourly):');
?>
示例3: array
<?php
echo Html::a(Yii::t('AdminModule.views_module_listOnline', 'More info'), $module['marketplaceUrl'], array('target' => '_blank'));
?>
· <?php
echo Yii::t('AdminModule.views_module_listOnline', 'Latest version:');
?>
<?php
echo $module['latestVersion'];
?>
· <?php
echo Yii::t('AdminModule.views_module_listOnline', 'Licence Key:');
?>
<?php
echo $module['licence_key'];
?>
</div>
</div>
</div>
<?php
}
?>
<?php
}
?>
</div>
</div>
<small class="pull-right">Installation Id: <?php
echo \humhub\models\Setting::get('installationId', 'admin');
?>
</small>