baserCMS クラスリファレンス

BlogCommentsAdminService extends BlogCommentsService
in package
implements BlogCommentsAdminServiceInterface Uses BcContainerTrait

BlogCommentsAdminService

Table of Contents

Interfaces

BlogCommentsAdminServiceInterface
BlogCommentsAdminServiceInterface

Properties

$BlogComments  : BlogCommentsTable|Table
BlogComments Table
$BlogComments  : BlogCommentsTable

Methods

__construct()  : mixed
ブログコメントを初期化する
add()  : EntityInterface
ブログコメントを登録する
batch()  : bool
アップロード対象となるフィールドに格納するファイル名を、指定したフィールドの値を利用したファイル名に変更する
delete()  : bool
ブログコメントを削除する
get()  : EntityInterface
ブログコメントの単一データを取得する
getBlogContent()  : EntityInterface
ブログコンテンツを取得する
getIndex()  : Query
ブログコメント一覧データを取得する
getNew()  : EntityInterface
ブログコメントの初期値を取得する
getService()  : array<string|int, mixed>|mixed|object
Get Service
getViewVarsForIndex()  : array<string|int, mixed>
ブログコメント一覧用の view 変数を取得
hasService()  : bool
Has Service
publish()  : EntityInterface|false
ブログコメントを公開状態に設定する
sendCommentToAdmin()  : void
管理者にコメント通知メールを送信する
sendCommentToContributor()  : void
コメント送信者にコメント通知メールを送信する
unpublish()  : EntityInterface|false
ブログコメントを非公開状態に設定する

Properties

Methods

__construct()

ブログコメントを初期化する

public __construct() : mixed
Tags
checked
noTodo
unitTest

add()

ブログコメントを登録する

public add(int $blogContentId, int $blogPostId, array<string|int, mixed> $postData) : EntityInterface
Parameters
$blogContentId : int
$blogPostId : int
$postData : array<string|int, mixed>
Tags
checked
Return values
EntityInterface

batch()

アップロード対象となるフィールドに格納するファイル名を、指定したフィールドの値を利用したファイル名に変更する

public batch(string $method, array<string|int, mixed> $ids) : bool

リネーム例

  • 元ファイル名が、sample.png
  • id フィールドを利用する
  • id に 585 が入っている
  • nameformat が %08d となっている

結果:00000585.png

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

delete()

ブログコメントを削除する

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

get()

ブログコメントの単一データを取得する

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

getBlogContent()

ブログコンテンツを取得する

public getBlogContent( $blogContentId) : EntityInterface
Parameters
$blogContentId :
Tags
checked
noTodo
Return values
EntityInterface

getIndex()

ブログコメント一覧データを取得する

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

getNew()

ブログコメントの初期値を取得する

public getNew() : EntityInterface
Tags
checked
noTodo
Return values
EntityInterface

初期値データ

getService()

Get Service

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

getViewVarsForIndex()

ブログコメント一覧用の view 変数を取得

public getViewVarsForIndex(int $blogContentId, int|null $blogPostId, ResultSet $blogComments) : array<string|int, mixed>
Parameters
$blogContentId : int

ブログコンテンツID

$blogPostId : int|null

ブログ記事ID

$blogComments : ResultSet

ブログコメント

Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>
  • blogComments: ブログコメント
  • blogContent: ブログコンテンツ
  • blogPost: ブログ記事

hasService()

Has Service

public hasService( $service) : bool
Parameters
$service :
Tags
checked
noTodo
unitTest
Return values
bool

publish()

ブログコメントを公開状態に設定する

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

sendCommentToAdmin()

管理者にコメント通知メールを送信する

public sendCommentToAdmin(EntityInterface|BlogComment $entity) : void
Parameters
$entity : EntityInterface|BlogComment
Tags
throws
Throwable
checked
noTodo

sendCommentToContributor()

コメント送信者にコメント通知メールを送信する

public sendCommentToContributor(EntityInterface|BlogComment $entity) : void
Parameters
$entity : EntityInterface|BlogComment
Tags
throws
Throwable
checked
noTodo

unpublish()

ブログコメントを非公開状態に設定する

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

        
On this page

Search results