個人用ツール

「ver4/関数リファレンス/getBlogs」を編集中

提供: baserCMS公式ガイド

移動: 案内, 検索

警告: ログインしていません。

編集すると、IPアドレスがこのページの編集履歴に記録されます。
この編集を取り消せます。 下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 編集中の文章
行6: 行6:
 
## 使い方
 
## 使い方
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
<?php $this->BcBaser->getBlogs( $name , [$options] ); ?>
+
$this->BcBaser->getBlogs( $name , [$options] );
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
## パラメータ
 
## パラメータ
 
(string) $name
 
(string) $name
: ブログアカウント名を指定するとそのブログのみの基本情報を返す。<br>
+
ブログアカウント名を指定するとそのブログのみの基本情報を返す。空指定(default)で、全てのブログの基本情報。<br>
空指定(default)で、全てのブログの基本情報。
+
ex) 'news' (初期値 : )
: - 初期値 :’ ’
+
  
(array) $options
+
(array) $options オプション(初期値 :array())<br>
オプション
+
- `sort` : データのソート順 取得出来るフィールドのどれかでソートができる ex) 'created DESC'(初期値 : 'id')<br>
: - 初期値 :array()
+
- `siteId` : サブサイトIDで絞り込む場合に指定する(初期値:0
:`sort` : データのソート順 取得出来るフィールドのどれかでソートができる ex) 'created DESC'(初期値 : 'id')<br>
+
:`siteId` : サブサイトIDで絞り込む場合に指定する(初期値:0
+
  
 
## 戻り値
 
## 戻り値
(array)
+
(array)サイト基本設定配列
: サイト基本設定配列
+
  
  
 
## 用例
 
## 用例
 
### 基本
 
### 基本
全てのブログの基本情報を出力する。
 
 
####コード
 
####コード
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
行37: 行32:
 
全ブログの情報が配列で出力される
 
全ブログの情報が配列で出力される
  
<syntaxhighlight lang="php">
 
array(3) {
 
  [0]=>
 
  array(23) {
 
    ["id"]=>
 
    string(1) "1"
 
    ["name"]=>
 
    string(4) "news"
 
    ["title"]=>
 
    string(12) "新着情報"
 
    ["description"]=>
 
    string(65) "baserCMS inc. [デモ] の最新の情報をお届けします。"
 
    ["layout"]=>
 
    string(7) "default"
 
    ["template"]=>
 
    string(7) "default"
 
    ["status"]=>
 
    bool(true)
 
    ["list_count"]=>
 
    string(2) "10"
 
    ["list_direction"]=>
 
    string(4) "DESC"
 
    ["feed_count"]=>
 
    string(2) "10"
 
    ["tag_use"]=>
 
    bool(true)
 
    ["comment_use"]=>
 
    string(1) "1"
 
    ["comment_approve"]=>
 
    string(1) "0"
 
    ["auth_captcha"]=>
 
    bool(true)
 
    ["widget_area"]=>
 
    string(1) "2"
 
    ["exclude_search"]=>
 
    bool(false)
 
    ["use_content"]=>
 
    bool(true)
 
    ["created"]=>
 
    string(19) "2016-02-02 21:01:37"
 
    ["modified"]=>
 
    NULL
 
    ["eye_catch_size_thumb_width"]=>
 
    string(3) "300"
 
    ["eye_catch_size_thumb_height"]=>
 
    string(3) "300"
 
    ["eye_catch_size_mobile_thumb_width"]=>
 
    string(3) "100"
 
    ["eye_catch_size_mobile_thumb_height"]=>
 
    string(3) "100"
 
  }
 
  [1]=>
 
  array(23) {
 
    ["id"]=>
 
    string(1) "2"
 
    ["name"]=>
 
    string(6) "course"
 
    ["title"]=>
 
    string(6) "講座"
 
  //  (省略)
 
  }
 
  [2]=>
 
  array(23) {
 
    ["id"]=>
 
    string(1) "3"
 
    ["name"]=>
 
    string(10) "staff-blog"
 
    ["title"]=>
 
    string(21) "スタッフブログ"
 
  //  (省略)
 
  }
 
}
 
</syntaxhighlight>
 
 
### 応用
 
### 応用
 
####コード
 
####コード
行119: 行41:
 
####出力
 
####出力
 
news ブログの情報が配列出力される
 
news ブログの情報が配列出力される
 
<syntaxhighlight lang="php">
 
array(3) {
 
  [0]=>
 
  array(23) {
 
    ["id"]=>
 
    string(1) "1"
 
    ["name"]=>
 
    string(4) "news"
 
    ["title"]=>
 
    string(12) "新着情報"
 
    ["description"]=>
 
    string(65) "baserCMS inc. [デモ] の最新の情報をお届けします。"
 
    ["layout"]=>
 
    string(7) "default"
 
    ["template"]=>
 
    string(7) "default"
 
    ["status"]=>
 
    bool(true)
 
    ["list_count"]=>
 
    string(2) "10"
 
    ["list_direction"]=>
 
    string(4) "DESC"
 
    ["feed_count"]=>
 
    string(2) "10"
 
    ["tag_use"]=>
 
    bool(true)
 
    ["comment_use"]=>
 
    string(1) "1"
 
    ["comment_approve"]=>
 
    string(1) "0"
 
    ["auth_captcha"]=>
 
    bool(true)
 
    ["widget_area"]=>
 
    string(1) "2"
 
    ["exclude_search"]=>
 
    bool(false)
 
    ["use_content"]=>
 
    bool(true)
 
    ["created"]=>
 
    string(19) "2016-02-02 21:01:37"
 
    ["modified"]=>
 
    NULL
 
    ["eye_catch_size_thumb_width"]=>
 
    string(3) "300"
 
    ["eye_catch_size_thumb_height"]=>
 
    string(3) "300"
 
    ["eye_catch_size_mobile_thumb_width"]=>
 
    string(3) "100"
 
    ["eye_catch_size_mobile_thumb_height"]=>
 
    string(3) "100"
 
  }
 
}
 
</syntaxhighlight>
 
  
 
## 注
 
## 注

baserCMS公式ガイドへのすべての投稿は、他の利用者によって編集、変更、除去される場合があります。 あなたの投稿を、他人が遠慮なく編集するのを望まない場合は、ここには投稿しないでください。
また、投稿するのは、あなたが書いたものか、パブリック ドメインまたはそれに類するフリーな資料からの複製であることを約束してください (詳細は[[Basercms:著作権 ]]を参照)。 著作権保護されている作品を、許諾なしに投稿してはいけません!

Add Categories
Update Categories

関数リファレンスver4

  

中止 | 編集の仕方 (新しいウィンドウで開きます)