m_rsc_gone (zotonic_core v1.0.0-rc.12)
Link to this section Summary
Functions
Get the possible 'rsc_gone' resource for the id.
Get the redirect location for the id, uses the current dispatch rule and otherwise the 'id' dispatch rule.
Get the possible 'rsc_gone' resource for the uri.
Copy a resource to the 'gone' table, use the current user as the modifier (deleter).
Copy a resource to the 'gone' table, use the current user as the modifier (deleter). Also sets the 'new id', which is the id that replaces the deleted id.
Install or upgrade the rsc_gone table.
Check if the resource used to exist.
Check if the resource uri used to exist.
Fetch the value for the key from a model source
Link to this section Functions
Link to this function
get(Id, Context)
Link to this function
get_new_location(Id, Context)
Link to this function
get_uri(Uri, Context)
-spec get_uri(binary() | string(), z:context()) -> proplists:proplist() | undefined.
Link to this function
gone(Id, Context)
-spec gone(m_rsc:resource_id(), z:context()) -> {ok, integer()} | {error, term()}.
Link to this function
gone(Id, NewId, Context)
Link to this function
install(Context)
-spec install(z:context()) -> ok.
Link to this function
is_gone(Id, Context)
-spec is_gone(m_rsc:resource_id() | undefined, z:context()) -> boolean().
Link to this function
is_gone_uri(Uri, Context)
-spec is_gone_uri(string() | binary() | undefined, z:context()) -> boolean().
Link to this function
m_get(Rest, Msg, Context)
-spec m_get(list(), zotonic_model:opt_msg(), z:context()) -> zotonic_model:return().