public function print_html($return = false) { $get_property_value = parent::_get_property_value_func(); $that = $this; $structure = $this->_structure; $nav_items = $get_property_value($structure->nav, array('if_closure' => function ($nav_items) use($that) { return SmartUI::run_callback($nav_items, array($that)); }, 'if_other' => function ($nav_items) { SmartUI::err('SmartUI::Nav:nav requires array'); return null; })); if (!is_array($nav_items)) { parent::err("SmartUI::Nav:nav requires array"); return null; } $list_items = $this->parse_nav($nav_items, true); $result = parent::print_list($list_items, null, true); if ($return) { return $result; } else { echo $result; } }