Module m_rsc_gone

Model for administration of deleted resources and their possible new location.

Copyright © 2012 Marc Worrell

Behaviours: zotonic_model.

Authors: Marc Worrell (marc@worrell.nl).

Description

Model for administration of deleted resources and their possible new location.

Function Index

get/2Get the possible 'rsc_gone' resource for the id.
get_new_location/2Get the redirect location for the id, uses the current dispatch rule and otherwise the 'id' dispatch rule.
gone/2Copy a resource to the 'gone' table, use the current user as the modifier (deleter).
gone/3Copy a resource to the 'gone' table, use the current user as the modifier (deleter).
is_gone/2Check if the resource used to exist.
m_get/3Fetch the value for the key from a model source.

Function Details

get/2

get(Id, Context) -> any()

Get the possible 'rsc_gone' resource for the id.

get_new_location/2

get_new_location(Id, Context) -> any()

Get the redirect location for the id, uses the current dispatch rule and otherwise the 'id' dispatch rule.

gone/2

gone(Id::integer(), Context::#context{}) -> {ok, integer()} | {error, term()}

Copy a resource to the 'gone' table, use the current user as the modifier (deleter).

gone/3

gone(Id, NewId, Context) -> any()

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.

is_gone/2

is_gone(Id::integer() | undefined, Context::#context{}) -> boolean()

Check if the resource used to exist.

m_get/3

m_get(Rest::list(), Msg::zotonic_model:opt_msg(), Context::z:context()) -> zotonic_model:return()

Fetch the value for the key from a model source


Generated by EDoc