Js
extends Base
in package
Table of Contents
Properties
- $bid : int
- $bids : array<string|int, int>
- $cid : int|null
- $cids : array<string|int, int>
- $eid : int|null
- $eids : array<string|int, int>
- $end : string
- $field : string
- $Field : Field_Search
- $keyword : string
- $limit : int|null
- $order : string
- $page : int<1, max>
- $start : string
- $tag : string
- $tags : array<string|int, string>
- $uid : int|null
- $uids : array<string|int, int>
- $axis : mixed
- 階層の設定
- $cacheLifetime : int
- $customFieldsEnabled : bool
- $Get : Field
- $identifier : string|null
- $mbid : int|null
- $mid : int|null
- $moduleContext : Field
- $Post : Field_Validation
- $scopes : array{uid?: "local"|"global", cid?: "local"|"global", eid?: "local"|"global", keyword?: "local"|"global", tag?: "local"|"global", field?: "local"|"global", date?: "local"|"global", start?: "local"|"global", end?: "local"|"global", page?: "local"|"global", order?: "local"|"global"}
- スコープの設定
Methods
- __construct() : void
- Constructor
- fire() : array<string|int, mixed>
- モジュールを実行
- get() : array<string|int, mixed>|never
- blogAxis() : string
- buildAxis() : void
- モジュールの階層設定を組み立て
- buildFieldTrait() : array<string|int, mixed>|null
- フィールドを連想配列として組み立て
- buildModuleContext() : void
- モジュールコンテキストを組み立て
- buildModuleField() : null|array<string|int, mixed>
- モジュールフィールドを組み立て
- categoryAxis() : string
- exec() : array<string|int, mixed>
- モジュールを実行結果を返却(キャッシュ考慮)
- getBaseParams() : array<string|int, mixed>
- モジュールの基本パラメータを取得
- getScope() : string
- 指定したコンテキストのスコープを取得 モジュール設定とURLのコンテキストを考慮します
- loadModuleConfig() : Field
- モジュールIDのコンフィグをロード
- moduleCacheEnabled() : bool
- キャッシュを使用すべきかどうかを返す
- resolveTemplateUrlsTrait() : array<string|int, mixed>
- toStructured の出力に対し、path フィールドの URL 解決と html フィールドの 絶対化(テンプレート出力固有)を適用する。
- setIntegerValue() : void
- 整数型の値を設定
- resolveTemplateUrlsInGroupRowTrait() : array<string|int, mixed>
- グループ内の 1 行に含まれるマルチ項目(連想配列構造)に対して URL 解決を適用。
- resolveTemplateUrlsInMultiEntryTrait() : array<string|int, mixed>
- マルチ項目フィールドエントリ('value'/'array' を持つ)に対して URL 解決を適用。
Properties
$bid
public
int
$bid
= null
$bids
public
array<string|int, int>
$bids
= []
$cid
public
int|null
$cid
= null
$cids
public
array<string|int, int>
$cids
= []
$eid
public
int|null
$eid
= null
$eids
public
array<string|int, int>
$eids
= []
$end
public
string
$end
$field
public
string
$field
$Field
public
Field_Search
$Field
$keyword
public
string
$keyword
$limit
public
int|null
$limit
= null
$order
public
string
$order
$page
public
int<1, max>
$page
= 1
$start
public
string
$start
$tag
public
string
$tag
$tags
public
array<string|int, string>
$tags
= []
$uid
public
int|null
$uid
= null
$uids
public
array<string|int, int>
$uids
= []
$axis
階層の設定
protected
mixed
$axis
= [
// phpcs:ignore
'bid' => 'self',
'cid' => 'self',
]
$cacheLifetime
protected
int
$cacheLifetime
= 0
$customFieldsEnabled
protected
bool
$customFieldsEnabled
= false
$Get
protected
Field
$Get
$identifier
protected
string|null
$identifier
= null
$mbid
protected
int|null
$mbid
= null
$mid
protected
int|null
$mid
= null
$moduleContext
protected
Field
$moduleContext
$Post
protected
Field_Validation
$Post
$scopes
スコープの設定
protected
array{uid?: "local"|"global", cid?: "local"|"global", eid?: "local"|"global", keyword?: "local"|"global", tag?: "local"|"global", field?: "local"|"global", date?: "local"|"global", start?: "local"|"global", end?: "local"|"global", page?: "local"|"global", order?: "local"|"global"}
$scopes
= []
Methods
__construct()
Constructor
public
__construct(array{bid?: int, bids?: int[], cid?: int, cids?: int[], eid?: int, eids?: int[], uid?: int, uids?: int[], page?: int, limit?: int, keyword?: string, tag?: string, field?: string, order?: string, start?: string, end?: string} $context, array<string|int, mixed> $scopes, array<string|int, mixed> $axis, Field_Validation $Post[, int $cacheLifetime = 0 ][, bool $customFieldsEnabled = false ][, null|int $mid = null ][, int|null $mbid = null ][, null|string $identifier = null ]) : void
Parameters
- $context : array{bid?: int, bids?: int[], cid?: int, cids?: int[], eid?: int, eids?: int[], uid?: int, uids?: int[], page?: int, limit?: int, keyword?: string, tag?: string, field?: string, order?: string, start?: string, end?: string}
- $scopes : array<string|int, mixed>
- $axis : array<string|int, mixed>
- $Post : Field_Validation
- $cacheLifetime : int = 0
- $customFieldsEnabled : bool = false
- $mid : null|int = null
- $mbid : int|null = null
- $identifier : null|string = null
fire()
モジュールを実行
public
fire() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>get()
public
get() : array<string|int, mixed>|never
Tags
Return values
array<string|int, mixed>|neverblogAxis()
protected
blogAxis() : string
Return values
stringbuildAxis()
モジュールの階層設定を組み立て
protected
buildAxis(array<string|int, mixed> $axis) : void
Parameters
- $axis : array<string|int, mixed>
buildFieldTrait()
フィールドを連想配列として組み立て
protected
buildFieldTrait(Field|Field_Validation $field[, string|null $scp = null ]) : array<string|int, mixed>|null
Parameters
- $field : Field|Field_Validation
- $scp : string|null = null
-
子フィールドとして再帰したときの名前(takeover キーの prefix に使う)
Return values
array<string|int, mixed>|null —フィールドが空の場合は null
buildModuleContext()
モジュールコンテキストを組み立て
protected
buildModuleContext(array{bid?: int|int[], cid?: int|int[], eid?: int|int[], uid?: int|int[], page?: int, limit?: int, keyword?: string, tag?: string, field?: string, order?: string, start?: string, end?: string} $context, array<string|int, mixed> $scopes) : void
Parameters
- $context : array{bid?: int|int[], cid?: int|int[], eid?: int|int[], uid?: int|int[], page?: int, limit?: int, keyword?: string, tag?: string, field?: string, order?: string, start?: string, end?: string}
- $scopes : array<string|int, mixed>
buildModuleField()
モジュールフィールドを組み立て
protected
buildModuleField() : null|array<string|int, mixed>
Return values
null|array<string|int, mixed>categoryAxis()
protected
categoryAxis() : string
Return values
stringexec()
モジュールを実行結果を返却(キャッシュ考慮)
protected
exec() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getBaseParams()
モジュールの基本パラメータを取得
protected
getBaseParams([array<string|int, mixed> $override = [] ]) : array<string|int, mixed>
Parameters
- $override : array<string|int, mixed> = []
Return values
array<string|int, mixed>getScope()
指定したコンテキストのスコープを取得 モジュール設定とURLのコンテキストを考慮します
protected
getScope(string $key, array<string|int, mixed> $scopes) : string
Parameters
- $key : string
- $scopes : array<string|int, mixed>
Return values
stringloadModuleConfig()
モジュールIDのコンフィグをロード
protected
loadModuleConfig() : Field
Return values
FieldmoduleCacheEnabled()
キャッシュを使用すべきかどうかを返す
protected
moduleCacheEnabled() : bool
Return values
boolresolveTemplateUrlsTrait()
toStructured の出力に対し、path フィールドの URL 解決と html フィールドの 絶対化(テンプレート出力固有)を適用する。
protected
resolveTemplateUrlsTrait(array<string|int, mixed> $data, Field|Field_Validation $field) : array<string|int, mixed>
- マルチ項目フィールド (['value' => {...}, 'array' => [...]]) の中の path / html
- グループ内マルチ項目(連番キーの行配列の中の各 baseName)の path / html
単一値フィールドや、グループ内単一値フィールドには URL 解決を適用しない(旧挙動)。
Parameters
- $data : array<string|int, mixed>
- $field : Field|Field_Validation
Return values
array<string|int, mixed>setIntegerValue()
整数型の値を設定
protected
setIntegerValue(string $key) : void
Parameters
- $key : string
resolveTemplateUrlsInGroupRowTrait()
グループ内の 1 行に含まれるマルチ項目(連想配列構造)に対して URL 解決を適用。
private
resolveTemplateUrlsInGroupRowTrait(array<string|int, mixed> $row, Field|Field_Validation $field) : array<string|int, mixed>
グループ内単一値は ['value' => x] の形なのでスキップ。 グループ内マルチ項目は ['alt' => x, 'path' => y, ...] の形。
Parameters
- $row : array<string|int, mixed>
- $field : Field|Field_Validation
Return values
array<string|int, mixed>resolveTemplateUrlsInMultiEntryTrait()
マルチ項目フィールドエントリ('value'/'array' を持つ)に対して URL 解決を適用。
private
resolveTemplateUrlsInMultiEntryTrait(array<string|int, mixed> $entry, string $baseName, Field|Field_Validation $field) : array<string|int, mixed>
Parameters
- $entry : array<string|int, mixed>
- $baseName : string
- $field : Field|Field_Validation