PHP Class BlogPost

Inheritance: extends BlogAppModel
Show file Open project: baserproject/basercms Class Usage Examples

Public Properties

Property Type Description
$actsAs array ビヘイビア
$belongsTo array belongsTo
$hasAndBelongsToMany array HABTM
$hasMany array hasMany
$name string クラス名
$searchIndexSaving boolean 検索テーブルへの保存可否
$validate array validate

Public Methods

Method Description
afterSave ( boolean $created, $options = [] ) : boolean afterSave
allowPublish ( $data ) : boolean 公開状態を取得する
beforeDelete ( $cascade = true ) : boolean beforeDelete
copy ( integer $id = null, array $data = [] ) : mixed コピーする
createPreviewData ( array $data ) プレビュー用のデータを生成する
createSearchIndex ( array $data ) : array 検索用データを生成する
existsEntry ( integer $blogContentId, integer $year, integer $month ) : boolean 指定した月の記事が存在するかチェックする
getAuthors ( integer $blogContentId, array $options ) : array 投稿者の一覧を取得する
getConditionAllowPublish ( ) : array 公開済の conditions を取得
getControlSource ( string $field, array $options = [] ) : array コントロールソースを取得する
getDefaultValue ( $authUser ) : array 初期値を取得する
getEntryDates ( integer $blogContentId, integer $year, integer $month ) : array カレンダー用に指定した月で記事の投稿がある日付のリストを取得する
getPostedDates ( integer $blogContentId, array $options ) : array ブログの月別一覧を取得する
getPublishes ( array $options ) : array 公開状態の記事を取得する
setupUpload ( integer $id ) アップロードビヘイビアの設定

Protected Methods

Method Description
_getEntryDatesConditions ( integer $blogContentId, integer $year, integer $month ) : string 年月を指定した検索条件を生成 データベースごとに構文が違う

Method Details

_getEntryDatesConditions() protected method

年月を指定した検索条件を生成 データベースごとに構文が違う
protected _getEntryDatesConditions ( integer $blogContentId, integer $year, integer $month ) : string
$blogContentId integer
$year integer
$month integer
return string

afterSave() public method

afterSave
public afterSave ( boolean $created, $options = [] ) : boolean
$created boolean
return boolean

allowPublish() public method

公開状態を取得する
public allowPublish ( $data ) : boolean
return boolean 公開状態

beforeDelete() public method

beforeDelete
public beforeDelete ( $cascade = true ) : boolean
return boolean

copy() public method

コピーする
public copy ( integer $id = null, array $data = [] ) : mixed
$id integer
$data array
return mixed page Or false

createPreviewData() public method

プレビュー用のデータを生成する
public createPreviewData ( array $data )
$data array

createSearchIndex() public method

検索用データを生成する
public createSearchIndex ( array $data ) : array
$data array
return array

existsEntry() public method

指定した月の記事が存在するかチェックする
public existsEntry ( integer $blogContentId, integer $year, integer $month ) : boolean
$blogContentId integer
$year integer
$month integer
return boolean

getAuthors() public method

投稿者の一覧を取得する
public getAuthors ( integer $blogContentId, array $options ) : array
$blogContentId integer ブログコンテンツID
$options array オプション
return array

getConditionAllowPublish() public method

公開済の conditions を取得
public getConditionAllowPublish ( ) : array
return array

getControlSource() public method

コントロールソースを取得する
public getControlSource ( string $field, array $options = [] ) : array
$field string フィールド名
$options array
return array コントロールソース

getDefaultValue() public method

初期値を取得する
public getDefaultValue ( $authUser ) : array
return array $authUser 初期値データ

getEntryDates() public method

カレンダー用に指定した月で記事の投稿がある日付のリストを取得する
public getEntryDates ( integer $blogContentId, integer $year, integer $month ) : array
$blogContentId integer ブログコンテンツID
$year integer
$month integer
return array

getPostedDates() public method

ブログの月別一覧を取得する
public getPostedDates ( integer $blogContentId, array $options ) : array
$blogContentId integer ブログコンテンツID
$options array オプション
return array 月別リストデータ

getPublishes() public method

公開状態の記事を取得する
public getPublishes ( array $options ) : array
$options array
return array

setupUpload() public method

アップロードビヘイビアの設定
public setupUpload ( integer $id )
$id integer ブログコンテンツID

Property Details

$actsAs public property

ビヘイビア
public array $actsAs
return array

$belongsTo public property

belongsTo
public array $belongsTo
return array

$hasAndBelongsToMany public property

HABTM
public array $hasAndBelongsToMany
return array

$hasMany public property

hasMany
public array $hasMany
return array

$name public property

クラス名
public string $name
return string

$searchIndexSaving public property

検索テーブルへの保存可否
public bool $searchIndexSaving
return boolean

$validate public property

validate
public array $validate
return array