$_nap
$_nap : \midcom_helper_nav
The NAP instance we belong to.
Itemlist Subclass: Topics, then articles in component sorting order
This sorting mode will keep the original components' sorting order intact, listing the subnodes first, then the leaves.
$_nap : \midcom_helper_nav
The NAP instance we belong to.
__construct(\midcom_helper_nav $nap, integer $parent_topic_id)
Initialize the object, used by the factory function.
\midcom_helper_nav | $nap | NAP object to use. |
integer | $parent_topic_id | An ID of the topic in which we operate. |
factory(string $sorting, \midcom_helper_nav $nap, integer $parent_topic) : \midcom_helper_nav_itemlist
Generate the object you want to use for getting a list of items for a certain topic.
Use this function to create sorted lists. Example: $nav_object = midcom_helper_nav_itemlist::factory($navorder, $this, $parent_topic); $result = $nav_object->get_sorted_list(); print_r($result); // shows: array (1 => array ( MIDCOM_NAV_ID => someid, MIDCOM_NAV_NAME => somename, MIDCOM_NAV_STYLE => false ) ); Note that most searchstyles do not bother with styles. But it is useful for custom classes.
string | $sorting | sorttype (e.g. topicsfirst) |
\midcom_helper_nav | $nap | pointer to the NAP object. |
integer | $parent_topic | pointer to the topic to base the list on. |