PHP 클래스 BlogBaserHelper

BcBaserHelper より透過的に呼び出される 《利用例》 $this->BcBaser->blogPosts('news')
상속: extends AppHelper
파일 보기 프로젝트 열기: baserproject/basercms

공개 프로퍼티들

프로퍼티 타입 설명
$helpers array ヘルパー

공개 메소드들

메소드 설명
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 年別記事一覧ページ判定

메소드 상세

blogPosts() 공개 메소드

ページ編集画面等で利用する事ができる。 ビュー: 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)
리턴 void

isBlogCategory() 공개 메소드

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

isBlogDate() 공개 메소드

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

isBlogHome() 공개 메소드

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

isBlogMonth() 공개 메소드

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

isBlogSingle() 공개 메소드

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

isBlogTag() 공개 메소드

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

isBlogYear() 공개 메소드

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

프로퍼티 상세

$helpers 공개적으로 프로퍼티

ヘルパー
public array $helpers
리턴 array