Value
Constants::CALLBACK_TYPE_TEMPLATE = 2
Semantics
Every action callback returns array( $callback_type, $payload ) from execute_callback(). With CALLBACK_TYPE_TEMPLATE:
The payload is a fully rendered template. The template JS (show_template) replaces the currently displayed template with the response.
Typical usage
The get_template action uses this type.
public function execute_callback(): array {
return array( Constants::CALLBACK_TYPE_TEMPLATE, $payload );
}