PHP Class BlogBaserHelper

BcBaserHelper より透過的に呼び出される 《利用例》 $this->BcBaser->blogPosts('news')
Inheritance: extends AppHelper
显示文件 Open project: baserproject/basercms

Public Properties

Property Type Description
$helpers array ヘルパー

Public Methods

Method Description
blogPosts ( string | array $contentsName = null, integer $num = 5, array $options = [] ) : void ブログ記事一覧出力
isBlogCategory ( ) : boolean カテゴリー別記事一覧ページ判定
isBlogDate ( ) : boolean 日別記事一覧ページ判定
isBlogHome ( ) : boolean インデックスページ判定
isBlogMonth ( ) : boolean 月別記事一覧ページ判定
isBlogSingle ( ) : boolean 個別ページ判定
isBlogTag ( ) : boolean タグ別記事一覧ページ判定
isBlogYear ( ) : boolean 年別記事一覧ページ判定

Method Details

blogPosts() public method

ページ編集画面等で利用する事ができる。 ビュー: lib/Baser/Plugin/Blog/View/blog/{コンテンツテンプレート名}/posts.php 《利用例》 $this->BcBaser->blogPosts('news', 3) 複数のコンテンツを指定する場合:配列にて複数のコンテンツ名を指定 コンテンツテンプレート名は配列の先頭を利用する $this->BcBaser->blogPosts(array('news', 'work'), 3) 全てのコンテンツを指定する場合:nullを指定 contentsTemplateオプションにて コンテンツテンプレート名を指定する(必須) $this->BcBaser->blogPosts(null, 3, array('contentsTemplate' => 'news'))
public blogPosts ( string | array $contentsName = null, integer $num = 5, array $options = [] ) : void
$contentsName string | array
$num integer 記事件数(初期値 : 5)
$options array オプション(初期値 : array()) - `category` : カテゴリで絞り込む場合にアルファベットのカテゴリ名指定(初期値 : null) - `tag` : タグで絞り込む場合にタグ名を指定(初期値 : null) - `year` : 年で絞り込む場合に年を指定(初期値 : null) - `month` : 月で絞り込む場合に月を指定(初期値 : null) - `day` : 日で絞り込む場合に日を指定(初期値 : null) - `id` : id で絞り込む場合に id を指定(初期値 : null) - `keyword` : キーワードで絞り込む場合にキーワードを指定(初期値 : null) - `contentsTemplate` : コンテンツテンプレート名を指定(初期値 : null) - `template` : 読み込むテンプレート名を指定する場合にテンプレート名を指定(初期値 : null) - `direction` : 並び順の方向を指定 [昇順:ASC or 降順:DESC or ランダム:RANDOM](初期値 : null) - `sort` : 並び替えの基準となるフィールドを指定(初期値 : null) - `page` : ページ数を指定(初期値 : null)
return void

isBlogCategory() public method

カテゴリー別記事一覧ページ判定
public isBlogCategory ( ) : boolean
return boolean 現在のページがカテゴリー別記事一覧ページであれば true を返す

isBlogDate() public method

日別記事一覧ページ判定
public isBlogDate ( ) : boolean
return boolean 現在のページが日別記事一覧ページであれば true を返す

isBlogHome() public method

インデックスページ判定
public isBlogHome ( ) : boolean
return boolean 現在のページがインデックスページであれば true を返す

isBlogMonth() public method

月別記事一覧ページ判定
public isBlogMonth ( ) : boolean
return boolean 現在のページが月別記事一覧ページであれば true を返す

isBlogSingle() public method

個別ページ判定
public isBlogSingle ( ) : boolean
return boolean 現在のページが個別ページであれば true を返す

isBlogTag() public method

タグ別記事一覧ページ判定
public isBlogTag ( ) : boolean
return boolean 現在のページがタグ別記事一覧ページであれば true を返す

isBlogYear() public method

年別記事一覧ページ判定
public isBlogYear ( ) : boolean
return boolean 現在のページが年別記事一覧ページであれば true を返す

Property Details

$helpers public_oe property

ヘルパー
public array $helpers
return array