Copyright © 2015 Marc Worrell
Behaviours: zotonic_model.
append/3 | |
assign_nrs/2 | Go through the flattened tree and assign the range nrs. |
children/3 | Return a list of all the ids below the id, excluding the id itself. |
contains/3 | Return the list of ids contained within (and including) the id. |
ensure/2 | Ensure that all resources are present in a hierarchy. |
ensure/3 | Ensure that all resources of a certain category are present in a hierarchy. |
flush/2 | |
m_get/3 | Fetch the value for the key from a model source. |
menu/2 | Transform a hierarchy to a menu structure. |
parents/3 | Return a list of all this id's ancestor nodes. |
save/3 | Save a new hierarchy, replacing a previous one. |
save_nocheck/3 | |
tree/2 | Fetch a named tree. |
tree1/2 | Fetch a 1 level deep tree. |
tree_flat/2 | Make a flattened list with indentations showing the level of the tree entries. |
tree_flat/3 |
append(Name0, Missing, Context) -> any()
assign_nrs(Diff, OldFlatNr) -> any()
Go through the flattened tree and assign the range nrs
children(Name, Id, Context) -> any()
Return a list of all the ids below the id, excluding the id itself
contains(Name, Id, Context) -> any()
Return the list of ids contained within (and including) the id.
ensure(Category::atom() | binary() | string() | integer(), Context::#context{}) -> {ok, integer()} | {error, term()}
Ensure that all resources are present in a hierarchy.
ensure(Name::atom() | binary() | string(), CatId::atom() | integer() | string(), Context::#context{}) -> {ok, integer()}
Ensure that all resources of a certain category are present in a hierarchy.
flush(Name, Context) -> any()
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
menu(Name, Context) -> any()
Transform a hierarchy to a menu structure
parents(Name, Id, Context) -> any()
Return a list of all this id's ancestor nodes
save(Name, Tree, Context) -> any()
Save a new hierarchy, replacing a previous one.
save_nocheck(Name, NewTree, Context) -> any()
tree(Id, Context) -> any()
Fetch a named tree
tree1(Tree, Context) -> any()
Fetch a 1 level deep tree
tree_flat(Name, Context) -> any()
Make a flattened list with indentations showing the level of the tree entries. Useful for select lists.
tree_flat(Name, Id, Context) -> any()
Generated by EDoc