$hierarchy $hierarchy : string (read only) The hierarchy of this object (path to the root) expressed in category ids. Type string
$long_name $long_name : string (read only) The hierarchy of this object (path to the root) expressed in terms of category names. Type string
is_child_of() is_child_of(int $a, int $b) : bool Test if category A is a child of category B Parameters int $a The first category id. int $b The second category id. Returns bool
save() save(bool $update_positions) Save this content object. Parameters bool $update_positions A flag indicating wether or not to update hierarchy positions across all categories.
load() load(int $id) : \CGContacts\category Load the specified category object, given it's id. Parameters int $id Returns \CGContacts\category
get_list() get_list() : array Get the categories as a list suitable for use in a dropdown. Returns array
get_category_id() get_category_id(string $str) : int Given a category name, attempt to find an id. Parameters string $str Returns int
get_category_name() get_category_name(int $id) : string|null Given a category id, get it's name Parameters int $id Returns string|null