mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-22 17:17:17 +01:00
Removed WebServerRequest parameter from get_and_render_template() in HTMLTemplate.
This commit is contained in:
parent
2fe82c604c
commit
81c8e4aa75
@ -463,11 +463,11 @@ String HTMLTemplate::render_template(const String &p_text, const Dictionary &p_d
|
||||
if (last_section_start <= text_length - 1) {
|
||||
result += p_text.substr_index(last_section_start, text_length);
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
String HTMLTemplate::get_and_render_template(const StringName &p_name, const Ref<WebServerRequest> &p_request, const Dictionary &p_data) {
|
||||
String HTMLTemplate::get_and_render_template(const StringName &p_name, const Dictionary &p_data) {
|
||||
String text = get_template_text(p_name);
|
||||
|
||||
return render_template(text, p_data);
|
||||
@ -729,7 +729,7 @@ void HTMLTemplate::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("process_template_expression", "expression", "data"), &HTMLTemplate::process_template_expression);
|
||||
ClassDB::bind_method(D_METHOD("render_template", "text", "data"), &HTMLTemplate::render_template);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_and_render_template", "name", "request", "data"), &HTMLTemplate::get_and_render_template);
|
||||
ClassDB::bind_method(D_METHOD("get_and_render_template", "name", "data"), &HTMLTemplate::get_and_render_template);
|
||||
|
||||
BIND_VMETHOD(MethodInfo(Variant::STRING, "_render",
|
||||
PropertyInfo(Variant::OBJECT, "request", PROPERTY_HINT_RESOURCE_TYPE, "WebServerRequest"),
|
||||
|
@ -92,7 +92,7 @@ public:
|
||||
String process_template_expression(const String &p_expression, const Dictionary &p_data);
|
||||
String render_template(const String &p_text, const Dictionary &p_data);
|
||||
|
||||
String get_and_render_template(const StringName &p_name, const Ref<WebServerRequest> &p_request, const Dictionary &p_data);
|
||||
String get_and_render_template(const StringName &p_name, const Dictionary &p_data);
|
||||
|
||||
String render(const Ref<WebServerRequest> &p_request, const Dictionary &p_data);
|
||||
virtual String _render(const Ref<WebServerRequest> &p_request, const Dictionary &p_data);
|
||||
|
Loading…
Reference in New Issue
Block a user