baserCMS クラスリファレンス

BcSearchIndexManagerBehavior extends Behavior
in package

Class BcSearchIndexManagerBehavior

検索インデックス管理ビヘイビア

Table of Contents

Properties

$Contents  : ContentsTable|Table
ContentsTable
$SearchIndexes  : SearchIndexesTable|Table
SearchIndexesTable
$SiteConfigs  : SiteConfigsTable|Table
SiteConfigsTable
$table  : Table
Table
$isExcluded  : bool
無視状態かどうか

Methods

afterDelete()  : mixed
After Delete
afterSave()  : void
afterSave
deleteSearchIndex()  : bool
コンテンツデータを削除する
initialize()  : void
initialize
isExcluded()  : bool
除外状態を確認する
saveSearchIndex()  : bool
検索インデクスデータを登録する
setExcluded()  : mixed
除外状態として設定する
unsetExcluded()  : mixed
除外状態の設定を解除する
updateSearchIndexMeta()  : bool
コンテンツメタ情報を更新する

Properties

Methods

afterDelete()

After Delete

public afterDelete(EventInterface $event, EntityInterface $entity, ArrayObject $options) : mixed
Parameters
$event : EventInterface
$entity : EntityInterface
$options : ArrayObject
Tags
checked
noTodo
unitTest

afterSave()

afterSave

public afterSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) : void
Parameters
$event : EventInterface
$entity : EntityInterface
$options : ArrayObject
Tags
checked
noTodo
unitTest

deleteSearchIndex()

コンテンツデータを削除する

public deleteSearchIndex(string $id) : bool
Parameters
$id : string
Tags
checked
noTodo
unitTest
Return values
bool

initialize()

initialize

public initialize(array<string|int, mixed> $config) : void
Parameters
$config : array<string|int, mixed>
Tags
checked
noTodo
unitTest

saveSearchIndex()

検索インデクスデータを登録する

public saveSearchIndex(array<string|int, mixed> $searchIndex) : bool

検索インデクスデータを次のように作成して引き渡す

['SearchIndex' => [ 'type' => 'コンテンツのタイプ', 'model_id' => 'モデルでのID', 'content_id' => 'コンテンツID', 'site_id' => 'サブサイトID', 'content_filter_id' => 'フィルターID' // カテゴリIDなど 'category' => 'カテゴリ名', 'title' => 'コンテンツタイトル', // 検索対象 'detail' => 'コンテンツ内容', // 検索対象 'url' => 'URL', 'status' => '公開ステータス', 'publish_begin' => '公開開始日', 'publish_end' => '公開終了日' ]]

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

updateSearchIndexMeta()

コンテンツメタ情報を更新する

public updateSearchIndexMeta() : bool
Tags
checked
noTodo
unitTest
Return values
bool

        
On this page

Search results