Copyright © 2009 Marc Worrell Date: 2009-04-08
Behaviours: gen_model.
Authors: Marc Worrell (marc@worrell.nl).
all_flat/1 | Return a flattened representation of the complete category tree. |
all_flat/2 | |
all_flat_meta/1 | |
boundaries/2 | |
delete/3 | Delete the category, move referring pages to another category. |
enumerate/1 | Take a category list and make it into a tree, recalculating the left/right and lvl nrs. |
get/2 | |
get_by_name/2 | |
get_by_parent/2 | |
get_page_count/2 | |
get_path/2 | Return the path from a root to the category (excluding the category itself). |
get_range/2 | |
get_range_by_name/2 | |
get_root/1 | |
id_to_name/2 | |
image/2 | |
insert/4 | |
is_a/2 | Return the list of categories (as atoms) that the category is part of. |
is_a/3 | Check if the id is within another category. |
last_modified/2 | Return the last modification date of the category. |
m_find_value/3 | Fetch the value for the key from a model source. |
m_to_list/2 | Transform a m_config value to a list, used for template loops. |
m_value/2 | Transform a model value so that it can be formatted or piped through filters. |
move_before/3 | Move a category in front of another category, resetting the parent of the moved category to the parent of the other category. |
move_below/3 | Move the category below another category, placing it at the end of the children of that category. |
move_end/2 | Move the category to the end of all categories, making it a top category in the process. |
name_to_id/2 | |
name_to_id_check/2 | |
ranges/2 | Given a list of category ids, return the list of numeric ranges they cover. |
renumber/1 | Renumber all categories so that the left/right and level indices are correct. |
renumber_pivot_task/2 | Resync all ids that have their category nr changed. |
tree/1 | Return the tree of all categories. |
tree/2 | Return the tree of all categories below a category id. |
tree_depth/2 | Return the tree of all categories till a certain depth. |
tree_depth/3 | Return the tree of all categories below a category id till a certain depth. |
update_sequence/2 |
all_flat(Context) -> any()
Return a flattened representation of the complete category tree. Can be used for overviews or select boxes. The "meta" categories of predicate, category and group are suppressed.
all_flat(CatId, Context) -> any()
all_flat_meta(Context) -> any()
boundaries(CatId::Id, Context::C) -> {Left, Right}
Delete the category, move referring pages to another category. Fails when the transfer id is not a category.
enumerate(Cats::[Cat]) -> [Sort]
Take a category list and make it into a tree, recalculating the left/right and lvl nrs
get(Name, Context) -> any()
get_by_name(Name, Context) -> any()
get_by_parent(Id, Context) -> any()
get_page_count(Id, Context) -> any()
get_path(Id, Context) -> [CatId]
Return the path from a root to the category (excluding the category itself)
get_range(Id, Context) -> any()
get_range_by_name(Name, Context) -> any()
get_root(Context) -> any()
id_to_name(Name, Context) -> any()
image(Id, Context) -> any()
insert(ParentId, Name, Props, Context) -> any()
is_a(Id::int(), Context) -> atomlist()
Return the list of categories (as atoms) that the category is part of
is_a(Id::int(), Cat, Context) -> atomlist()
Check if the id is within another category.
last_modified(Cat::term(), Context) -> {ok, {{Y, M, D}, {Hour, Min, Sec}}} | {error, Reason}
Return the last modification date of the category. Returns false
m_find_value(Index::Key, M::Source, Context) -> term()
Fetch the value for the key from a model source
m_to_list(M::Source, Context) -> List
Transform a m_config value to a list, used for template loops
m_value(M::Source, Context) -> term()
Transform a model value so that it can be formatted or piped through filters
Move a category in front of another category, resetting the parent of the moved category to the parent of the other category.
Move the category below another category, placing it at the end of the children of that category.
move_end(CatId::int(), Context) -> ok | {error, Reason}
Move the category to the end of all categories, making it a top category in the process
name_to_id(Id, Context) -> any()
name_to_id_check(Name, Context) -> any()
ranges(Cat::CatList, Context) -> RangeList
Given a list of category ids, return the list of numeric ranges they cover.
renumber(Context) -> ok
Renumber all categories so that the left/right and level indices are correct.
renumber_pivot_task(LowId, Context) -> any()
Resync all ids that have their category nr changed.
tree(Context) -> Tree
Return the tree of all categories
tree(CatId, Context) -> TreeNode
Return the tree of all categories below a category id
tree_depth(Depth, Context) -> Tree
Return the tree of all categories till a certain depth
tree_depth(CatId, Depth, Context) -> TreeNode
Return the tree of all categories below a category id till a certain depth
update_sequence(Ids, Context) -> any()
Generated by EDoc, Feb 25 2011, 21:14:42.