MishkaCmsCore. Runtime. Resources. Calculations. VersionPreview
(Mishka CMS Core v0.0.1)
Copy Markdown
View Source
What a record said in one of its own versions, for a preview before a restore.
The :version_id argument must name a version of THE RECORD being loaded; any other version — of
another record, or of another site's — answers nil, the same as a version that does not exist.
The record itself was read as the caller, so the version is read as the system once it is known to
be the record's own.
Options
:version— the resource's AshPaperTrail version resource. Required. It must have a:get_anyread.
Usage
calculate :version_preview,
:map,
{MishkaCmsCore.Runtime.Resources.Calculations.VersionPreview,
version: MishkaCmsCore.Runtime.Layout.Version} do
argument :version_id, :uuid, allow_nil?: false
end
Summary
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.load/3.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.load/3.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.