Module m_rsc_gone

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

Copyright 2012 Marc Worrell

Behaviours: gen_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.
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_find_value/3Fetch the value for the key from a model source.
m_to_list/2Transform a m_config value to a list, used for template loops.
m_value/2Transform a model value so that it can be formatted or piped through filters.

Function Details

get/2

get(Id, Context) -> any()

Get the possible 'rsc_gone' resource for the id.

gone/2

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

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(), Context::#context{}) -> boolean()

Check if the resource used to exist.

m_find_value/3

m_find_value(Key, M::Source, Context) -> term()

Fetch the value for the key from a model source

m_to_list/2

m_to_list(M::Source, Context) -> List

Transform a m_config value to a list, used for template loops

m_value/2

m_value(M::Source, Context) -> term()

Transform a model value so that it can be formatted or piped through filters


Generated by EDoc, Dec 21 2014, 04:51:52.