baserCMS クラスリファレンス

CustomContentFrontService extends BcFrontContentsService
in package
implements CustomContentFrontServiceInterface uses BcContainerTrait, BcQueryParameterTrait

CustomContentFrontService

Table of Contents

Interfaces

CustomContentFrontServiceInterface

Properties

$ContentsService  : CustomContentsService
カスタムコンテンツサービス
$EntriesService  : CustomEntriesService
カスタムエントリーサービス

Methods

__construct()  : mixed
Constructor
getArchivesTemplate()  : string
アーカイブページ用のテンプレートを取得する
getCustomContent()  : mixed
カスタムエントリーの単一データを取得する
getCustomEntries()  : mixed
カスタムエントリーの一覧を取得する
getIndexTemplate()  : string
一覧用のテンプレートを取得する
getService()  : array<string|int, mixed>|mixed|object
Get Service
getViewTemplate()  : string
詳細ページ用のテンプレートを取得する
getViewVarsForArchives()  : array<string|int, mixed>
アーカイブページ用の View 変数を取得する
getViewVarsForFront()  : array<string|int, mixed>
フロント用の view 変数を取得する
getViewVarsForIndex()  : array<string|int, mixed>
一覧用の View 変数を取得する
getViewVarsForView()  : array<string|int, mixed>
詳細ページ用の View 変数を取得する
getViewVarsForYear()  : array<string|int, mixed>
年別アーカイブページ用の View 変数を取得する
getYearTemplate()  : string
年別アーカイブページ用のテンプレートを取得する
hasService()  : bool
Has Service
removeOrmStructure()  : array<string|int, mixed>
リクエスト由来のクエリパラメータから ORM 内部構造キーを除去する
setupPreviewForIndex()  : void
カスタムエントリーの詳細ページ用のプレビューのセットアップを行う
setupPreviewForView()  : void
カスタムエントリーの詳細ページ用のプレビューのセットアップを行う
getCrumbs()  : array<string|int, mixed>
パンくず用のデータを取得する

Properties

Methods

getArchivesTemplate()

アーカイブページ用のテンプレートを取得する

public getArchivesTemplate(CustomContent $customContent) : string
Parameters
$customContent : CustomContent
Tags
checked
noTodo
unitTest
Return values
string

getCustomContent()

カスタムエントリーの単一データを取得する

public getCustomContent(int $entityId) : mixed
Parameters
$entityId : int
Tags
checked
noTodo
unitTest

getCustomEntries()

カスタムエントリーの一覧を取得する

public getCustomEntries(CustomContent $customContent[, array<string|int, mixed> $queryParams = [] ]) : mixed
Parameters
$customContent : CustomContent
$queryParams : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest

getService()

Get Service

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

getViewVarsForArchives()

アーカイブページ用の View 変数を取得する

public getViewVarsForArchives(EntityInterface $customContent, PaginatedInterface $customEntries, string $archivesName) : array<string|int, mixed>
Parameters
$customContent : EntityInterface
$customEntries : PaginatedInterface
$archivesName : string
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>

getViewVarsForFront()

フロント用の view 変数を取得する

public getViewVarsForFront(Content $content[, bool $viewContentCrumb = false ]) : array<string|int, mixed>
Parameters
$content : Content
$viewContentCrumb : bool = false

対象コンテンツのページかどうか

Tags
noTodo
checked
unitTest
Return values
array<string|int, mixed>

getViewVarsForIndex()

一覧用の View 変数を取得する

public getViewVarsForIndex(EntityInterface $customContent, PaginatedInterface $customEntries) : array<string|int, mixed>
Parameters
$customContent : EntityInterface
$customEntries : PaginatedInterface
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>

getViewVarsForView()

詳細ページ用の View 変数を取得する

public getViewVarsForView(EntityInterface $customContent, int $entryId[, bool $preview = false ]) : array<string|int, mixed>
Parameters
$customContent : EntityInterface
$entryId : int
$preview : bool = false
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>

getViewVarsForYear()

年別アーカイブページ用の View 変数を取得する

public getViewVarsForYear(EntityInterface $customContent, PaginatedInterface $customEntries, string $archivesName) : array<string|int, mixed>
Parameters
$customContent : EntityInterface
$customEntries : PaginatedInterface
$archivesName : string
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>

getYearTemplate()

年別アーカイブページ用のテンプレートを取得する

public getYearTemplate(CustomContent $customContent) : string
Parameters
$customContent : CustomContent
Tags
checked
noTodo
unitTest
Return values
string

hasService()

Has Service

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

removeOrmStructure()

リクエスト由来のクエリパラメータから ORM 内部構造キーを除去する

public removeOrmStructure(array<string|int, mixed> $queryParams) : array<string|int, mixed>

contain / conditions / fields などの ORM 内部構造は、本来サーバ側で のみ組み立てるものであり、フロントの未信頼入力から受け取ると SQL インジェクションの sink になる(GHSA-ch8f-q957-r9xm / GHSA-2ghw-gwvv-mv56)。 公開フロントのコントローラは、リクエストのクエリパラメータをサービスへ 渡す前に本メソッドを通し、これらのキーを取り除くこと。

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

リクエスト由来のクエリパラメータ

Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed> —

ORM 内部構造キーを除去したクエリパラメータ

setupPreviewForIndex()

カスタムエントリーの詳細ページ用のプレビューのセットアップを行う

public setupPreviewForIndex(Controller $controller) : void
Parameters
$controller : Controller
Tags
checked
noTodo
unitTest

setupPreviewForView()

カスタムエントリーの詳細ページ用のプレビューのセットアップを行う

public setupPreviewForView(Controller $controller) : void
Parameters
$controller : Controller
Tags
checked
noTodo
unitTest

getCrumbs()

パンくず用のデータを取得する

protected getCrumbs(mixed $id[, bool $viewContentCrumb = false ]) : array<string|int, mixed>
Parameters
$id : mixed
$viewContentCrumb : bool = false

コンテンツ管理対象コンテンツのパンくずを表示するかどうか

Tags
noTodo
checked
unitTest
Return values
array<string|int, mixed>
On this page

Search results