buildTreeNodes function

List<Object> buildTreeNodes(
  1. MetaObject context,
  2. ControllerManager controllerManager,
  3. List<TreeNode> nodes
)

Implementation

List<Object> buildTreeNodes(MetaObject context, ControllerManager controllerManager, List<TreeNode> nodes) {
  if(nodes==null) return [];
  List<Object> result = List();
  for(TreeNode node in nodes) {
    var subr = node.build(context, controllerManager);
    if(subr!=null) {
      if(subr is List) {
        result.addAll(subr);
      }else{
        result.add(subr);
      }
    }
  }
  return result;
}