a-blog cms PHP API Reference

GroupFieldDiffCalculator
in package

グループフィールド (child フィールド) の行削除差分検出。

DB 側にある @path 値のうち、POST 側に存在しないものを返す純粋関数。 image バリエーション (tiny/large/square, .webp) の列挙は行わず、 必要なら呼び出し元で CustomFieldAssetCleaner と組み合わせる。

Table of Contents

Methods

calculateRemovedRows()  : array<string|int, string>
DB 側にあり POST 側に無い path を一意化して返す。

Methods

calculateRemovedRows()

DB 側にあり POST 側に無い path を一意化して返す。

public static calculateRemovedRows(array<string|int, string> $dbValue, array<string|int, string> $postValue) : array<string|int, string>

空文字列と重複は除去される。順序は保証しない。

Parameters
$dbValue : array<string|int, string>

DB 側の @path 値一覧

$postValue : array<string|int, string>

POST 側の @path 値一覧

Return values
array<string|int, string>

削除対象 path の配列 (一意化済み、順序不定)


        
On this page

Search results