baserCMS クラスリファレンス

BlogCategoriesServiceInterface

BlogCategoriesServiceInterface

Table of Contents

Methods

batch()  : bool
一括処理
create()  : EntityInterface|null
新規作成
delete()  : bool
削除する
get()  : EntityInterface
単一レコードを取得する
getControlSource()  : mixed
コントロールソース取得
getIndex()  : Query
一覧を取得する
getList()  : array<string|int, mixed>
ブログカテゴリーリスト取得
getNamesById()  : array<string|int, mixed>
IDを指定して名前リストを取得する
getNew()  : EntityInterface
新規エンティティ取得
getTreeIndex()  : array<string|int, mixed>
getTreeIndex
move()  : EntityInterface|bool
カテゴリの配置を移動する(並び替え・再親付け)
resetTree()  : bool
ブログカテゴリのツリー構造をリセットする
update()  : EntityInterface|null
更新する
verityTree()  : bool
ブログカテゴリのツリー構造をチェックする

Methods

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

create()

新規作成

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

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

getControlSource()

コントロールソース取得

public getControlSource(string $field, array<string|int, mixed> $options) : mixed
Parameters
$field : string
$options : array<string|int, mixed>
Tags
checked
noTodo
unitTest

getIndex()

一覧を取得する

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

getList()

ブログカテゴリーリスト取得

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

getNamesById()

IDを指定して名前リストを取得する

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

getNew()

新規エンティティ取得

public getNew(int $blogContentId[, int|null $parentId = null ]) : EntityInterface
Parameters
$blogContentId : int
$parentId : int|null = null

親カテゴリID(子カテゴリとして追加する場合に指定)

Tags
checked
noTodo
unitTest
Return values
EntityInterface

getTreeIndex()

getTreeIndex

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

move()

カテゴリの配置を移動する(並び替え・再親付け)

public move(array<string|int, mixed> $origin, array<string|int, mixed> $target) : EntityInterface|bool

移動元の親IDは DB 上のエンティティから取得する

Parameters
$origin : array<string|int, mixed>

移動元 ['id' => int](parentId は後方互換のため受け付けるが利用しない)

$target : array<string|int, mixed>

移動先 ['id' => int|null, 'parentId' => int|null]

Tags
checked
noTodo
unitTest
Return values
EntityInterface|bool

resetTree()

ブログカテゴリのツリー構造をリセットする

public resetTree() : bool

全てのカテゴリをルート直下にフラット化し、lft / rght を振り直す。

Tags
checked
noTodo
unitTest
Return values
bool

update()

更新する

public update(EntityInterface $target, array<string|int, mixed> $postData) : EntityInterface|null
Parameters
$target : EntityInterface
$postData : array<string|int, mixed>
Tags
throws
PersistenceFailedException
checked
noTodo
unitTest
Return values
EntityInterface|null

verityTree()

ブログカテゴリのツリー構造をチェックする

public verityTree() : bool

問題がある場合にはログを出力する

Tags
checked
noTodo
unitTest
Return values
bool
On this page

Search results