WidgetTemplates final class
Minn\Widgets\WidgetTemplates · public/minn/src/Minn/Widgets/WidgetTemplates.php · 77 lines
The Underscore templates the Text and Custom HTML widgets print for their controls (render_control_template_scripts), as the reference prints them (probe widget-methods): a title field and the content area, the Text widget's two hidden pointers, and, for a user who may not post unfiltered HTML, the note on the tags the code editor refuses. The whitespace is the reference's own and is part of the answer.
Constants and properties
| private | CLOSE = ' </script> ' | |
| private | REFUSED_TAGS = ' <# if ( data.codeEditorDisabled ) { #> <p> Some HTML tags are not permitted, including: <code>script</code>, <code>iframe</code>, <code>form</code>, <code>input</code>, <code>style</code> </p> <# } #> ' | The note a user who may not post unfiltered HTML sees, when the code editor is off. |
Public
| static | text(): string# | The Text widget's template: title, the two pointers, the content area. |
| static | customHtml(): string# | The Custom HTML widget's template for a user who may post unfiltered HTML. |
| static | customHtmlRestricted(): string# | The Custom HTML widget's template for a user who may not, with the note on refused tags. |
Internals 3
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | customHtmlWith(string $note): string# | |
| private | open(string $widget): string# | The script tag, the element id prefix both templates make, and the title field. |
| private | pointer(string $class, string $heading, string $paragraph): string# | A hidden pointer: its heading, its paragraph (with the reference's indents around it), a dismiss link. |
Nothing matches.