function createTree(&$smarty, $interface_name) { $req = new GetTree($interface_name); $resp = $req->sendAndRecv(); if (!$resp->isSuccessful()) { $resp->setErrorInSmarty($smarty); return ""; } $root_node = $resp->getResult(); return createSubTree($smarty, $root_node, "nothing"); }