Copyright © 2009-2020 Marc Worrell
Behaviours: zotonic_model.
Authors: Marc Worrell (marc@worrell.nl).
all/1 | Return all configurations from the configuration table. |
delete/3 | Delete the specified module/key combination. |
get/2 | Get the list of configuration key for the module. |
get/3 | Get a configuration value for the given module/key combination. |
get_boolean/3 | |
get_boolean/4 | |
get_id/3 | Lookup the unique id in the config table from the module/key combination. |
get_value/3 | |
get_value/4 | |
m_get/3 | Fetch the value for the key from a model source. |
set_prop/5 | Set a "complex" config value. |
set_value/4 | Set a "simple" config value. |
all(Context::z:context()) -> list()
Return all configurations from the configuration table. Returns a nested proplist (module, key)
delete(Module::atom() | binary(), Key::atom() | binary(), Context::z:context()) -> ok
Delete the specified module/key combination
get(Module::atom() | binary() | undefined, Context::z:context()) -> proplists:proplist()
Get the list of configuration key for the module. Returns the empty list for non existing keys, otherwise a property list with all the module settings.
get(Module::atom() | binary(), Key::atom() | binary(), Context::z:context()) -> proplists:proplist() | undefined
Get a configuration value for the given module/key combination.
get_boolean(Module::atom() | binary(), Key::atom() | binary(), Context::z:context()) -> boolean()
get_boolean(Module::atom() | binary(), Key::atom() | binary(), Default::term(), Context::z:context()) -> boolean()
get_id(Module, Key, Context) -> any()
Lookup the unique id in the config table from the module/key combination.
get_value(Module::atom() | binary(), Key::atom() | binary(), Context::z:context()) -> term() | undefined
get_value(Module::atom() | binary(), Key::atom() | binary(), Default::term(), Context::z:context()) -> term() | undefined
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
set_prop(Module::atom() | binary(), Key::atom() | binary(), Prop::atom() | binary(), PropValue::term(), Context::z:context()) -> ok | {error, term()}
Set a "complex" config value.
set_value(Module::atom() | binary(), Key::atom() | binary(), Value::string() | binary() | atom(), Context::z:context()) -> ok | {error, term()}
Set a "simple" config value.
Generated by EDoc