MDL-31224 navigation: Added JSON handling on action_link objects to the navigation

This commit is contained in:
Sam Hemelryk
2012-01-25 10:10:51 +08:00
parent 19967a153e
commit e1ba9e119c
+2
View File
@@ -4077,6 +4077,8 @@ class navigation_json {
$attributes['link'] = $child->action;
} else if ($child->action instanceof moodle_url) {
$attributes['link'] = $child->action->out();
} else if ($child->action instanceof action_link) {
$attributes['link'] = $child->action->url->out();
}
$attributes['hidden'] = ($child->hidden);
$attributes['haschildren'] = ($child->children->count()>0 || $child->type == navigation_node::TYPE_CATEGORY);