plugin->categories->getCategoriesAsArray(); } if ($operation == "create") { $id = 0; $obj = $TeKe->plugin->loadType($type, $id); $obj_id = $obj->build(get_inputs()); $result["status"] = "success"; $result["id"] = $obj_id; } else if ($operation == "remove") { $obj = $TeKe->plugin->loadType($type, $id); $delete_result = $obj->delete(); $result["status"] = "failure"; if ($delete_result) { $result["status"] = "success"; } } echo json_encode($result); ?>