baserCMS クラスリファレンス

BlogPostsServiceInterface

BlogPostsServiceInterface

Table of Contents

Methods

allowPublish()  : bool
公開状態を取得する
batch()  : bool
一括処理
copy()  : false|mixed
ブログ記事をコピーする
create()  : EntityInterface
新規登録
delete()  : bool
ブログ記事を削除する
get()  : EntityInterface
単一データを取得する
getControlSource()  : array<string|int, mixed>|false
コントロールソースを取得する
getIndex()  : Query
ブログ記事一覧を取得する
getIndexByAuthor()  : Query
著者別記事一覧を取得
getIndexByCategory()  : Query
カテゴリ別記事一覧を取得
getIndexByDate()  : Query
日付別記事一覧を取得
getIndexByTag()  : Query
タグ別記事一覧を取得
getNew()  : EntityInterface
初期データ用のエンティティを取得
getNextPost()  : BlogPost|EntityInterface
次の記事を取得する
getPrevPost()  : BlogPost|EntityInterface
前の記事を取得する
getRelatedPosts()  : array<string|int, mixed>|Query
関連するブログ記事を取得する
getTitlesById()  : array<string|int, mixed>
IDからタイトルリストを取得する
publish()  : EntityInterface|false
記事を公開状態に設定する
setupUpload()  : void
BlogPostsTable のファイルアップロードの設定を実施
unpublish()  : EntityInterface|false
記事を非公開状態に設定する
update()  : EntityInterface
ブログ記事を更新する

Methods

allowPublish()

公開状態を取得する

public allowPublish(EntityInterface $post) : bool
Parameters
$post : EntityInterface
Tags
checked
noTodo
unitTest
Return values
bool

公開状態

batch()

一括処理

public batch(string $method, array<string|int, mixed> $ids) : bool
Parameters
$method : string
$ids : array<string|int, mixed>
Tags
checked
noTodo
unitTest
Return values
bool

copy()

ブログ記事をコピーする

public copy(int $id) : false|mixed
Parameters
$id : int
Tags
checked
noTodo
unitTest
Return values
false|mixed

create()

新規登録

public create(array<string|int, mixed> $postData) : EntityInterface
Parameters
$postData : array<string|int, mixed>
Tags
checked
noTodo
unitTest
Return values
EntityInterface

delete()

ブログ記事を削除する

public delete(int $id) : bool
Parameters
$id : int
Tags
checked
noTodo
unitTest
Return values
bool

get()

単一データを取得する

public get(int $id[, array<string|int, mixed> $options = [] ]) : EntityInterface
Parameters
$id : int
$options : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
EntityInterface

getControlSource()

コントロールソースを取得する

public getControlSource(string $field[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>|false

blog_category_id / user_id / blog_tag_id を対象とする

Parameters
$field : string
$options : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>|false

getIndex()

ブログ記事一覧を取得する

public getIndex([array<string|int, mixed> $queryParams = [] ]) : Query
Parameters
$queryParams : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
Query

getIndexByAuthor()

著者別記事一覧を取得

public getIndexByAuthor(string $author[, array<string|int, mixed> $options = [] ]) : Query
Parameters
$author : string
$options : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
Query

getIndexByCategory()

カテゴリ別記事一覧を取得

public getIndexByCategory(string $category[, array<string|int, mixed> $options = [] ]) : Query
Parameters
$category : string
$options : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
Query

getIndexByDate()

日付別記事一覧を取得

public getIndexByDate(string $year, string $month, string $day[, array<string|int, mixed> $options = [] ]) : Query
Parameters
$year : string
$month : string
$day : string
$options : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
Query

getIndexByTag()

タグ別記事一覧を取得

public getIndexByTag(string $tag[, array<string|int, mixed> $options = [] ]) : Query
Parameters
$tag : string
$options : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
Query

getNew()

初期データ用のエンティティを取得

public getNew(int $blogContentId, int $userId) : EntityInterface
Parameters
$blogContentId : int
$userId : int
Tags
checked
noTodo
unitTest
Return values
EntityInterface

getRelatedPosts()

関連するブログ記事を取得する

public getRelatedPosts(BlogPost $post[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>|Query
Parameters
$post : BlogPost
$options : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>|Query

getTitlesById()

IDからタイトルリストを取得する

public getTitlesById(array<string|int, mixed> $ids) : array<string|int, mixed>
Parameters
$ids : array<string|int, mixed>
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>

publish()

記事を公開状態に設定する

public publish(int $id) : EntityInterface|false

公開期間指定は初期化する

Parameters
$id : int
Tags
checked
noTodo
unitTest
Return values
EntityInterface|false

setupUpload()

BlogPostsTable のファイルアップロードの設定を実施

public setupUpload(int $blogContentId) : void
Parameters
$blogContentId : int
Tags
checked
noTodo
unitTest

unpublish()

記事を非公開状態に設定する

public unpublish(int $id) : EntityInterface|false

公開期間指定は初期化する

Parameters
$id : int
Tags
checked
noTodo
unitTest
Return values
EntityInterface|false

update()

ブログ記事を更新する

public update(EntityInterface|BlogPost $post, array<string|int, mixed> $postData) : EntityInterface
Parameters
$post : EntityInterface|BlogPost
$postData : array<string|int, mixed>
Tags
checked
noTodo
unitTest
Return values
EntityInterface

        
On this page

Search results