「ver4/関数リファレンス/currentBlogId」の版間の差分
提供: baserCMS公式ガイド
Katokaisya (トーク | 投稿記録) |
|||
行1: | 行1: | ||
− | |||
− | |||
## 説明 | ## 説明 | ||
− | + | 閲覧しているブログのIDを出力します。 ブログIDは管理画面の「ブログ設定編集」→ 「その他情報」の、実体IDと対応しています。 | |
− | + | ||
## 使い方 | ## 使い方 | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | $this->Blog->currentBlogId() | + | $this->Blog->currentBlogId(); |
</syntaxhighlight> | </syntaxhighlight> | ||
− | ## | + | ## パラメーター |
+ | なし | ||
## 戻り値 | ## 戻り値 | ||
(void) | (void) | ||
+ | : | ||
## 用例 | ## 用例 | ||
行19: | 行18: | ||
####コード | ####コード | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | <?php $this->Blog->currentBlogId() ?> | + | <?php $this->Blog->currentBlogId(); ?> |
</syntaxhighlight> | </syntaxhighlight> | ||
####出力 | ####出力 | ||
− | + | 実体IDが "1" の場合 | |
− | <syntaxhighlight lang=" | + | <syntaxhighlight lang="html4strict"> |
1 | 1 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:関数リファレンスver4]] | [[Category:関数リファレンスver4]] |
2018年6月11日 (月) 12:40時点における最新版
説明
閲覧しているブログのIDを出力します。 ブログIDは管理画面の「ブログ設定編集」→ 「その他情報」の、実体IDと対応しています。
使い方
$this->Blog->currentBlogId();
パラメーター
なし
戻り値
- (void)
用例
基本
コード
<?php $this->Blog->currentBlogId(); ?>
出力
実体IDが "1" の場合
1