Hi -
I've been experimenting and adding renderers and templates to some of the plugins I maintain. Its been a learning experience!
Some of the code currently uses "html_writer::" to output things like checkbox form elements. I know how I can easily reproduce this with renderers, but how do I do it with templates?
So, for example, I have a line of code that says:
$output .= html_writer::checkbox('q'.$this->id.'[]', $id, $checked, $text);
That results in HTML that looks like:
<input id="checkbox_5845d7bd0909b2" value="31" name="q127[]" type="checkbox">
<label for="checkbox_5845d7bd0909b2">1</label>
How would I reproduce this same sort of functionality using a mustache template?
Pointers to existing docs is fine too (I couldn't find any).