本文整理汇总了PHP中app\models\Setting::getSiteName方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getSiteName方法的具体用法?PHP Setting::getSiteName怎么用?PHP Setting::getSiteName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Setting
的用法示例。
在下文中一共展示了Setting::getSiteName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
public function actionIndex()
{
$setting = new Setting();
$data['siteName'] = $setting->getSiteName()->value;
$data['address'] = $setting->getAddress()->value;
$data['nickName'] = $setting->getNickName()->value;
$data['desc'] = $setting->getDesc()->value;
return $this->render('index', ['info' => $data]);
}
示例2: Menu
use app\assets\AppAsset;
use app\models\Menu;
use app\models\Setting;
use app\models\Article;
use yii\helpers\Url;
AppAsset::register($this);
$menu = new Menu();
$tags = $menu->getTags();
$all = 0;
foreach ($tags as $tag) {
$all += $tag['num'];
}
$average = $all / count($tags);
$list = $menu->getMenuList();
$setting = new Setting();
$siteName = $setting->getSiteName()->value;
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php
echo Yii::$app->language;
?>
">
<head>
<meta charset="<?php
echo Yii::$app->charset;
?>
">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
echo Html::csrfMetaTags();