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
$Contents
ContentsTable
public
ContentsTable|Table
$Contents
$SearchIndexes
SearchIndexesTable
public
SearchIndexesTable|Table
$SearchIndexes
$SiteConfigs
SiteConfigsTable
public
SiteConfigsTable|Table
$SiteConfigs
$table
Table
public
Table
$table
$isExcluded
無視状態かどうか
private
bool
$isExcluded
= false
Methods
afterDelete()
After Delete
public
afterDelete(EventInterface $event, EntityInterface $entity, ArrayObject $options) : mixed
Parameters
- $event : EventInterface
- $entity : EntityInterface
- $options : ArrayObject
Tags
afterSave()
afterSave
public
afterSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) : void
Parameters
- $event : EventInterface
- $entity : EntityInterface
- $options : ArrayObject
Tags
deleteSearchIndex()
コンテンツデータを削除する
public
deleteSearchIndex(string $id) : bool
Parameters
- $id : string
Tags
Return values
boolinitialize()
initialize
public
initialize(array<string|int, mixed> $config) : void
Parameters
- $config : array<string|int, mixed>
Tags
isExcluded()
除外状態を確認する
public
isExcluded() : bool
Tags
Return values
boolsaveSearchIndex()
検索インデクスデータを登録する
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
Return values
boolsetExcluded()
除外状態として設定する
public
setExcluded() : mixed
Tags
unsetExcluded()
除外状態の設定を解除する
public
unsetExcluded() : mixed
Tags
updateSearchIndexMeta()
コンテンツメタ情報を更新する
public
updateSearchIndexMeta() : bool