@@ -170,7 +170,7 @@ |
||
| 170 | 170 | return |
| 171 | 171 | Marker::div( |
| 172 | 172 | Marker::label( |
| 173 | - Form::input($field_name, $field_value, $attributes) . Marker::span($field_label), |
|
| 173 | + Form::input($field_name, $field_value, $attributes).Marker::span($field_label), |
|
| 174 | 174 | ['for' => $attributes['id']] |
| 175 | 175 | ), |
| 176 | 176 | ['class' => 'checkbutton'] |
@@ -2,253 +2,253 @@ discard block |
||
| 2 | 2 | declare(strict_types=1); |
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | - * HTML generator |
|
| 6 | - * Marker, hommage to Christian François Bouche-Villeneuve aka Chris Marker |
|
| 7 | - * |
|
| 8 | - * show off @method |
|
| 9 | - * |
|
| 10 | - * @method string abbr(string $content, array $attr) |
|
| 11 | - * creates an abbreviation or an acronym |
|
| 12 | - * @method string acronym(string $content, array $attr) |
|
| 13 | - * creates an acronym (not supported in HTML5. use abbr() instead) |
|
| 14 | - * @method string address(string $content, array $attr) |
|
| 15 | - * creates contact information for the author/owner of a document |
|
| 16 | - * @method string applet(string $content, array $attr) |
|
| 17 | - * creates an embedded applet |
|
| 18 | - * (not supported in HTML5. use embed() or <object> instead) |
|
| 19 | - * @method string area(string $content, array $attr) |
|
| 20 | - * creates an area inside an image map |
|
| 21 | - * @method string article(string $content, array $attr) |
|
| 22 | - * creates an article |
|
| 23 | - * @method string aside(string $content, array $attr) |
|
| 24 | - * creates content aside from the page content |
|
| 25 | - * @method string audio(string $content, array $attr) |
|
| 26 | - * creates embedded sound content |
|
| 27 | - * @method string b(string $content, array $attr) |
|
| 28 | - * creates bold text |
|
| 29 | - * @method string base(string $content, array $attr) |
|
| 30 | - * creates an element that specifies the base url/target for all relative urls in a document |
|
| 31 | - * @method string basefont(string $content, array $attr) |
|
| 32 | - * creates an element that specifies a default color, size, and font for all text in a document |
|
| 33 | - * (not supported in HTML5. use CSS instead) |
|
| 34 | - * @method string bdi(string $content, array $attr) |
|
| 35 | - * creates an element that isolates a part of text that might be formatted |
|
| 36 | - * in a different direction from other text outside it |
|
| 37 | - * @method string bdo(string $content, array $attr) |
|
| 38 | - * creates an element that overrides the current text direction |
|
| 39 | - * @method string big(string $content, array $attr) |
|
| 40 | - * creates an element that defines big text (not supported in HTML5. use CSS instead) |
|
| 41 | - * @method string blockquote(string $content, array $attr) |
|
| 42 | - * creates a section that is quoted from another source |
|
| 43 | - * @method string body(string $content, array $attr) |
|
| 44 | - * creates the document's body |
|
| 45 | - * @method string br(string $content, array $attr) |
|
| 46 | - * creates a single line break |
|
| 47 | - * @method string button(string $content, array $attr) |
|
| 48 | - * creates a clickable button |
|
| 49 | - * @method string canvas(string $content, array $attr) |
|
| 50 | - * used to draw graphics, on the fly, via scripting (usually javascript) |
|
| 51 | - * @method string caption(string $content, array $attr) |
|
| 52 | - * creates a table caption |
|
| 53 | - * @method string center(string $content, array $attr) |
|
| 54 | - * defines centered text (not supported in HTML5. use CSS instead) |
|
| 55 | - * @method string cite(string $content, array $attr) |
|
| 56 | - * creates the title of a work |
|
| 57 | - * @method string code(string $content, array $attr) |
|
| 58 | - * creates a piece of computer code |
|
| 59 | - * @method string col(string $content, array $attr) |
|
| 60 | - * specifies column properties for each column within a <colgroup> element |
|
| 61 | - * @method string colgroup(string $content, array $attr) |
|
| 62 | - * specifies a group of one or more columns in a table for formatting |
|
| 63 | - * @method string data(string $content, array $attr) |
|
| 64 | - * adds a machine-readable translation of a given content |
|
| 65 | - * @method string datalist(string $content, array $attr) |
|
| 66 | - * specifies a list of pre-defined options for input controls |
|
| 67 | - * @method string dd(string $content, array $attr) |
|
| 68 | - * creates a description/value of a term in a description list |
|
| 69 | - * @method string del(string $content, array $attr) |
|
| 70 | - * creates text that has been deleted from a document |
|
| 71 | - * @method string details(string $content, array $attr) |
|
| 72 | - * creates additional details that the user can view or hide |
|
| 73 | - * @method string dfn(string $content, array $attr) |
|
| 74 | - * specifies a term that is going to be defined within the content |
|
| 75 | - * @method string dialog(string $content, array $attr) |
|
| 76 | - * creates a dialog box or window |
|
| 77 | - * @method string dir(string $content, array $attr) |
|
| 78 | - * defines a directory list (not supported in HTML5. use ul() instead) |
|
| 79 | - * @method string div(string $content, array $attr) |
|
| 80 | - * creates a section in a document |
|
| 81 | - * @method string dl(string $content, array $attr) |
|
| 82 | - * creates a description list |
|
| 83 | - * @method string dt(string $content, array $attr) |
|
| 84 | - * creates a term/name in a description list |
|
| 85 | - * @method string em(string $content, array $attr) |
|
| 86 | - * creates emphasized text |
|
| 87 | - * @method string embed(string $content, array $attr) |
|
| 88 | - * creates a container for an external application |
|
| 89 | - * @method string fieldset(string $content, array $attr) |
|
| 90 | - * groups related elements in a form |
|
| 91 | - * @method string figcaption(string $content, array $attr) |
|
| 92 | - * creates a caption for a <figure> element |
|
| 93 | - * @method string figure(string $content, array $attr) |
|
| 94 | - * specifies self-contained content |
|
| 95 | - * @method string font(string $content, array $attr) |
|
| 96 | - * defines font, color, and size for text (not supported in HTML5. use CSS instead) |
|
| 97 | - * @method string footer(string $content, array $attr) |
|
| 98 | - * creates a footer for a document or section |
|
| 99 | - * @method string form(string $content, array $attr) |
|
| 100 | - * creates an HTML form for user input |
|
| 101 | - * @method string frame(string $content, array $attr) |
|
| 102 | - * defines a window (a frame) in a frameset (not supported in HTML5) |
|
| 103 | - * @method string frameset(string $content, array $attr) |
|
| 104 | - * defines a set of frames (not supported in HTML5) |
|
| 105 | - * @method string h1(string $content, array $attr) |
|
| 106 | - * creates HTML headings 1 |
|
| 107 | - * @method string h2(string $content, array $attr) |
|
| 108 | - * creates HTML headings 2 |
|
| 109 | - * @method string h3(string $content, array $attr) |
|
| 110 | - * creates HTML headings 3 |
|
| 111 | - * @method string h4(string $content, array $attr) |
|
| 112 | - * creates HTML headings 4 |
|
| 113 | - * @method string h5(string $content, array $attr) |
|
| 114 | - * creates HTML headings 5 |
|
| 115 | - * @method string h6(string $content, array $attr) |
|
| 116 | - * creates HTML headings 6 |
|
| 117 | - * @method string head(string $content, array $attr) |
|
| 118 | - * contains metadata/information for the document |
|
| 119 | - * @method string header(string $content, array $attr) |
|
| 120 | - * creates a header for a document or section |
|
| 121 | - * @method string hr(string $content, array $attr) |
|
| 122 | - * creates a thematic change in the content |
|
| 123 | - * @method string html(string $content, array $attr) |
|
| 124 | - * creates the root of an HTML document |
|
| 125 | - * @method string i(string $content, array $attr) |
|
| 126 | - * creates a part of text in an alternate voice or mood |
|
| 127 | - * @method string iframe(string $content, array $attr) |
|
| 128 | - * creates an inline frame |
|
| 129 | - * @method string input(string $content, array $attr) |
|
| 130 | - * creates an input control |
|
| 131 | - * @method string ins(string $content, array $attr) |
|
| 132 | - * creates a text that has been inserted into a document |
|
| 133 | - * @method string kbd(string $content, array $attr) |
|
| 134 | - * creates keyboard input |
|
| 135 | - * @method string label(string $content, array $attr) |
|
| 136 | - * creates a label for an <input> element |
|
| 137 | - * @method string legend(string $content, array $attr) |
|
| 138 | - * creates a caption for a <fieldset> element |
|
| 139 | - * @method string li(string $content, array $attr) |
|
| 140 | - * creates a list item |
|
| 141 | - * @method string link(string $content, array $attr) |
|
| 142 | - * creates the relationship between a document and an external resource |
|
| 143 | - * (most used to link to style sheets) |
|
| 144 | - * @method string main(string $content, array $attr) |
|
| 145 | - * specifies the main content of a document |
|
| 146 | - * @method string map(string $content, array $attr) |
|
| 147 | - * creates an image map |
|
| 148 | - * @method string mark(string $content, array $attr) |
|
| 149 | - * creates marked/highlighted text |
|
| 150 | - * @method string meta(string $content, array $attr) |
|
| 151 | - * creates metadata about an HTML document |
|
| 152 | - * @method string meter(string $content, array $attr) |
|
| 153 | - * creates a scalar measurement within a known range (a gauge) |
|
| 154 | - * @method string nav(string $content, array $attr) |
|
| 155 | - * creates navigation links |
|
| 156 | - * @method string noframes(string $content, array $attr) |
|
| 157 | - * defines an alternate content for users that do not support frames |
|
| 158 | - * (not supported in HTML5) |
|
| 159 | - * @method string noscript(string $content, array $attr) |
|
| 160 | - * creates an alternate content for users that do not support client-side scripts |
|
| 161 | - * @method string object(string $content, array $attr) |
|
| 162 | - * creates a container for an external application |
|
| 163 | - * @method string ol(string $content, array $attr) |
|
| 164 | - * creates an ordered list |
|
| 165 | - * @method string optgroup(string $content, array $attr) |
|
| 166 | - * creates a group of related options in a drop-down list |
|
| 167 | - * @method string option(string $content, array $attr) |
|
| 168 | - * creates an option in a drop-down list |
|
| 169 | - * @method string output(string $content, array $attr) |
|
| 170 | - * creates the result of a calculation |
|
| 171 | - * @method string p(string $content, array $attr) |
|
| 5 | + * HTML generator |
|
| 6 | + * Marker, hommage to Christian François Bouche-Villeneuve aka Chris Marker |
|
| 7 | + * |
|
| 8 | + * show off @method |
|
| 9 | + * |
|
| 10 | + * @method string abbr(string $content, array $attr) |
|
| 11 | + * creates an abbreviation or an acronym |
|
| 12 | + * @method string acronym(string $content, array $attr) |
|
| 13 | + * creates an acronym (not supported in HTML5. use abbr() instead) |
|
| 14 | + * @method string address(string $content, array $attr) |
|
| 15 | + * creates contact information for the author/owner of a document |
|
| 16 | + * @method string applet(string $content, array $attr) |
|
| 17 | + * creates an embedded applet |
|
| 18 | + * (not supported in HTML5. use embed() or <object> instead) |
|
| 19 | + * @method string area(string $content, array $attr) |
|
| 20 | + * creates an area inside an image map |
|
| 21 | + * @method string article(string $content, array $attr) |
|
| 22 | + * creates an article |
|
| 23 | + * @method string aside(string $content, array $attr) |
|
| 24 | + * creates content aside from the page content |
|
| 25 | + * @method string audio(string $content, array $attr) |
|
| 26 | + * creates embedded sound content |
|
| 27 | + * @method string b(string $content, array $attr) |
|
| 28 | + * creates bold text |
|
| 29 | + * @method string base(string $content, array $attr) |
|
| 30 | + * creates an element that specifies the base url/target for all relative urls in a document |
|
| 31 | + * @method string basefont(string $content, array $attr) |
|
| 32 | + * creates an element that specifies a default color, size, and font for all text in a document |
|
| 33 | + * (not supported in HTML5. use CSS instead) |
|
| 34 | + * @method string bdi(string $content, array $attr) |
|
| 35 | + * creates an element that isolates a part of text that might be formatted |
|
| 36 | + * in a different direction from other text outside it |
|
| 37 | + * @method string bdo(string $content, array $attr) |
|
| 38 | + * creates an element that overrides the current text direction |
|
| 39 | + * @method string big(string $content, array $attr) |
|
| 40 | + * creates an element that defines big text (not supported in HTML5. use CSS instead) |
|
| 41 | + * @method string blockquote(string $content, array $attr) |
|
| 42 | + * creates a section that is quoted from another source |
|
| 43 | + * @method string body(string $content, array $attr) |
|
| 44 | + * creates the document's body |
|
| 45 | + * @method string br(string $content, array $attr) |
|
| 46 | + * creates a single line break |
|
| 47 | + * @method string button(string $content, array $attr) |
|
| 48 | + * creates a clickable button |
|
| 49 | + * @method string canvas(string $content, array $attr) |
|
| 50 | + * used to draw graphics, on the fly, via scripting (usually javascript) |
|
| 51 | + * @method string caption(string $content, array $attr) |
|
| 52 | + * creates a table caption |
|
| 53 | + * @method string center(string $content, array $attr) |
|
| 54 | + * defines centered text (not supported in HTML5. use CSS instead) |
|
| 55 | + * @method string cite(string $content, array $attr) |
|
| 56 | + * creates the title of a work |
|
| 57 | + * @method string code(string $content, array $attr) |
|
| 58 | + * creates a piece of computer code |
|
| 59 | + * @method string col(string $content, array $attr) |
|
| 60 | + * specifies column properties for each column within a <colgroup> element |
|
| 61 | + * @method string colgroup(string $content, array $attr) |
|
| 62 | + * specifies a group of one or more columns in a table for formatting |
|
| 63 | + * @method string data(string $content, array $attr) |
|
| 64 | + * adds a machine-readable translation of a given content |
|
| 65 | + * @method string datalist(string $content, array $attr) |
|
| 66 | + * specifies a list of pre-defined options for input controls |
|
| 67 | + * @method string dd(string $content, array $attr) |
|
| 68 | + * creates a description/value of a term in a description list |
|
| 69 | + * @method string del(string $content, array $attr) |
|
| 70 | + * creates text that has been deleted from a document |
|
| 71 | + * @method string details(string $content, array $attr) |
|
| 72 | + * creates additional details that the user can view or hide |
|
| 73 | + * @method string dfn(string $content, array $attr) |
|
| 74 | + * specifies a term that is going to be defined within the content |
|
| 75 | + * @method string dialog(string $content, array $attr) |
|
| 76 | + * creates a dialog box or window |
|
| 77 | + * @method string dir(string $content, array $attr) |
|
| 78 | + * defines a directory list (not supported in HTML5. use ul() instead) |
|
| 79 | + * @method string div(string $content, array $attr) |
|
| 80 | + * creates a section in a document |
|
| 81 | + * @method string dl(string $content, array $attr) |
|
| 82 | + * creates a description list |
|
| 83 | + * @method string dt(string $content, array $attr) |
|
| 84 | + * creates a term/name in a description list |
|
| 85 | + * @method string em(string $content, array $attr) |
|
| 86 | + * creates emphasized text |
|
| 87 | + * @method string embed(string $content, array $attr) |
|
| 88 | + * creates a container for an external application |
|
| 89 | + * @method string fieldset(string $content, array $attr) |
|
| 90 | + * groups related elements in a form |
|
| 91 | + * @method string figcaption(string $content, array $attr) |
|
| 92 | + * creates a caption for a <figure> element |
|
| 93 | + * @method string figure(string $content, array $attr) |
|
| 94 | + * specifies self-contained content |
|
| 95 | + * @method string font(string $content, array $attr) |
|
| 96 | + * defines font, color, and size for text (not supported in HTML5. use CSS instead) |
|
| 97 | + * @method string footer(string $content, array $attr) |
|
| 98 | + * creates a footer for a document or section |
|
| 99 | + * @method string form(string $content, array $attr) |
|
| 100 | + * creates an HTML form for user input |
|
| 101 | + * @method string frame(string $content, array $attr) |
|
| 102 | + * defines a window (a frame) in a frameset (not supported in HTML5) |
|
| 103 | + * @method string frameset(string $content, array $attr) |
|
| 104 | + * defines a set of frames (not supported in HTML5) |
|
| 105 | + * @method string h1(string $content, array $attr) |
|
| 106 | + * creates HTML headings 1 |
|
| 107 | + * @method string h2(string $content, array $attr) |
|
| 108 | + * creates HTML headings 2 |
|
| 109 | + * @method string h3(string $content, array $attr) |
|
| 110 | + * creates HTML headings 3 |
|
| 111 | + * @method string h4(string $content, array $attr) |
|
| 112 | + * creates HTML headings 4 |
|
| 113 | + * @method string h5(string $content, array $attr) |
|
| 114 | + * creates HTML headings 5 |
|
| 115 | + * @method string h6(string $content, array $attr) |
|
| 116 | + * creates HTML headings 6 |
|
| 117 | + * @method string head(string $content, array $attr) |
|
| 118 | + * contains metadata/information for the document |
|
| 119 | + * @method string header(string $content, array $attr) |
|
| 120 | + * creates a header for a document or section |
|
| 121 | + * @method string hr(string $content, array $attr) |
|
| 122 | + * creates a thematic change in the content |
|
| 123 | + * @method string html(string $content, array $attr) |
|
| 124 | + * creates the root of an HTML document |
|
| 125 | + * @method string i(string $content, array $attr) |
|
| 126 | + * creates a part of text in an alternate voice or mood |
|
| 127 | + * @method string iframe(string $content, array $attr) |
|
| 128 | + * creates an inline frame |
|
| 129 | + * @method string input(string $content, array $attr) |
|
| 130 | + * creates an input control |
|
| 131 | + * @method string ins(string $content, array $attr) |
|
| 132 | + * creates a text that has been inserted into a document |
|
| 133 | + * @method string kbd(string $content, array $attr) |
|
| 134 | + * creates keyboard input |
|
| 135 | + * @method string label(string $content, array $attr) |
|
| 136 | + * creates a label for an <input> element |
|
| 137 | + * @method string legend(string $content, array $attr) |
|
| 138 | + * creates a caption for a <fieldset> element |
|
| 139 | + * @method string li(string $content, array $attr) |
|
| 140 | + * creates a list item |
|
| 141 | + * @method string link(string $content, array $attr) |
|
| 142 | + * creates the relationship between a document and an external resource |
|
| 143 | + * (most used to link to style sheets) |
|
| 144 | + * @method string main(string $content, array $attr) |
|
| 145 | + * specifies the main content of a document |
|
| 146 | + * @method string map(string $content, array $attr) |
|
| 147 | + * creates an image map |
|
| 148 | + * @method string mark(string $content, array $attr) |
|
| 149 | + * creates marked/highlighted text |
|
| 150 | + * @method string meta(string $content, array $attr) |
|
| 151 | + * creates metadata about an HTML document |
|
| 152 | + * @method string meter(string $content, array $attr) |
|
| 153 | + * creates a scalar measurement within a known range (a gauge) |
|
| 154 | + * @method string nav(string $content, array $attr) |
|
| 155 | + * creates navigation links |
|
| 156 | + * @method string noframes(string $content, array $attr) |
|
| 157 | + * defines an alternate content for users that do not support frames |
|
| 158 | + * (not supported in HTML5) |
|
| 159 | + * @method string noscript(string $content, array $attr) |
|
| 160 | + * creates an alternate content for users that do not support client-side scripts |
|
| 161 | + * @method string object(string $content, array $attr) |
|
| 162 | + * creates a container for an external application |
|
| 163 | + * @method string ol(string $content, array $attr) |
|
| 164 | + * creates an ordered list |
|
| 165 | + * @method string optgroup(string $content, array $attr) |
|
| 166 | + * creates a group of related options in a drop-down list |
|
| 167 | + * @method string option(string $content, array $attr) |
|
| 168 | + * creates an option in a drop-down list |
|
| 169 | + * @method string output(string $content, array $attr) |
|
| 170 | + * creates the result of a calculation |
|
| 171 | + * @method string p(string $content, array $attr) |
|
| 172 | 172 | * creates a paragraph |
| 173 | - * @method string param(string $content, array $attr) |
|
| 173 | + * @method string param(string $content, array $attr) |
|
| 174 | 174 | * creates a parameter for an object |
| 175 | - * @method string picture(string $content, array $attr) |
|
| 175 | + * @method string picture(string $content, array $attr) |
|
| 176 | 176 | * creates a container for multiple image resources |
| 177 | - * @method string pre(string $content, array $attr) |
|
| 177 | + * @method string pre(string $content, array $attr) |
|
| 178 | 178 | * creates preformatted text |
| 179 | - * @method string progress(string $content, array $attr) represents the progress of a task |
|
| 180 | - * @method string q(string $content, array $attr) |
|
| 179 | + * @method string progress(string $content, array $attr) represents the progress of a task |
|
| 180 | + * @method string q(string $content, array $attr) |
|
| 181 | 181 | * creates a short quotation |
| 182 | - * @method string rp(string $content, array $attr) |
|
| 182 | + * @method string rp(string $content, array $attr) |
|
| 183 | 183 | * creates what to show in browsers that do not support ruby annotations |
| 184 | - * @method string rt(string $content, array $attr) |
|
| 184 | + * @method string rt(string $content, array $attr) |
|
| 185 | 185 | * creates an explanation/pronunciation of characters (for east asian typography) |
| 186 | - * @method string ruby(string $content, array $attr) |
|
| 186 | + * @method string ruby(string $content, array $attr) |
|
| 187 | 187 | * creates a ruby annotation (for east asian typography) |
| 188 | - * @method string s(string $content, array $attr) |
|
| 188 | + * @method string s(string $content, array $attr) |
|
| 189 | 189 | * creates text that is no longer correct |
| 190 | - * @method string samp(string $content, array $attr) |
|
| 190 | + * @method string samp(string $content, array $attr) |
|
| 191 | 191 | * creates sample output from a computer program |
| 192 | - * @method string script(string $content, array $attr) |
|
| 192 | + * @method string script(string $content, array $attr) |
|
| 193 | 193 | * creates a client-side script |
| 194 | - * @method string section(string $content, array $attr) |
|
| 194 | + * @method string section(string $content, array $attr) |
|
| 195 | 195 | * creates a section in a document |
| 196 | - * @method string select(string $content, array $attr) |
|
| 196 | + * @method string select(string $content, array $attr) |
|
| 197 | 197 | * creates a drop-down list |
| 198 | - * @method string small(string $content, array $attr) |
|
| 198 | + * @method string small(string $content, array $attr) |
|
| 199 | 199 | * creates smaller text |
| 200 | - * @method string source(string $content, array $attr) |
|
| 200 | + * @method string source(string $content, array $attr) |
|
| 201 | 201 | * creates multiple media resources for media elements (<video> and <audio>) |
| 202 | - * @method string span(string $content, array $attr) |
|
| 202 | + * @method string span(string $content, array $attr) |
|
| 203 | 203 | * creates a section in a document |
| 204 | - * @method string strike(string $content, array $attr) defines strikethrough text |
|
| 205 | - * (not supported in HTML5. use del() or s() instead) |
|
| 206 | - * @method string strong(string $content, array $attr) |
|
| 204 | + * @method string strike(string $content, array $attr) defines strikethrough text |
|
| 205 | + * (not supported in HTML5. use del() or s() instead) |
|
| 206 | + * @method string strong(string $content, array $attr) |
|
| 207 | 207 | * creates important text |
| 208 | - * @method string style(string $content, array $attr) |
|
| 208 | + * @method string style(string $content, array $attr) |
|
| 209 | 209 | * creates style information for a document |
| 210 | - * @method string sub(string $content, array $attr) |
|
| 210 | + * @method string sub(string $content, array $attr) |
|
| 211 | 211 | * creates subscripted text |
| 212 | - * @method string summary(string $content, array $attr) |
|
| 212 | + * @method string summary(string $content, array $attr) |
|
| 213 | 213 | * creates a visible heading for a <details> element |
| 214 | - * @method string sup(string $content, array $attr) |
|
| 214 | + * @method string sup(string $content, array $attr) |
|
| 215 | 215 | * creates superscripted text |
| 216 | - * @method string svg(string $content, array $attr) |
|
| 216 | + * @method string svg(string $content, array $attr) |
|
| 217 | 217 | * creates a container for svg graphics |
| 218 | - * @method string table(string $content, array $attr) |
|
| 218 | + * @method string table(string $content, array $attr) |
|
| 219 | 219 | * creates a table |
| 220 | - * @method string tbody(string $content, array $attr) groups the body content in a table |
|
| 221 | - * @method string td(string $content, array $attr) |
|
| 220 | + * @method string tbody(string $content, array $attr) groups the body content in a table |
|
| 221 | + * @method string td(string $content, array $attr) |
|
| 222 | 222 | * creates a cell in a table |
| 223 | - * @method string template(string $content, array $attr) |
|
| 223 | + * @method string template(string $content, array $attr) |
|
| 224 | 224 | * creates a container for content that should be hidden when the page loads |
| 225 | - * @method string textarea(string $content, array $attr) |
|
| 225 | + * @method string textarea(string $content, array $attr) |
|
| 226 | 226 | * creates a multiline input control (text area) |
| 227 | - * @method string tfoot(string $content, array $attr) groups the footer content in a table |
|
| 228 | - * @method string th(string $content, array $attr) |
|
| 227 | + * @method string tfoot(string $content, array $attr) groups the footer content in a table |
|
| 228 | + * @method string th(string $content, array $attr) |
|
| 229 | 229 | * creates a header cell in a table |
| 230 | - * @method string thead(string $content, array $attr) groups the header content in a table |
|
| 231 | - * @method string time(string $content, array $attr) |
|
| 230 | + * @method string thead(string $content, array $attr) groups the header content in a table |
|
| 231 | + * @method string time(string $content, array $attr) |
|
| 232 | 232 | * creates a specific time (or datetime) |
| 233 | - * @method string title(string $content, array $attr) |
|
| 233 | + * @method string title(string $content, array $attr) |
|
| 234 | 234 | * creates a title for the document |
| 235 | - * @method string tr(string $content, array $attr) |
|
| 235 | + * @method string tr(string $content, array $attr) |
|
| 236 | 236 | * creates a row in a table |
| 237 | - * @method string track(string $content, array $attr) |
|
| 237 | + * @method string track(string $content, array $attr) |
|
| 238 | 238 | * creates text tracks for media elements (<video> and <audio>) |
| 239 | - * @method string tt(string $content, array $attr) |
|
| 239 | + * @method string tt(string $content, array $attr) |
|
| 240 | 240 | * creates an element that defines teletype text (not supported in HTML5. use CSS instead) |
| 241 | - * @method string u(string $content, array $attr) |
|
| 241 | + * @method string u(string $content, array $attr) |
|
| 242 | 242 | * creates some text that is unarticulated and styled differently from normal text |
| 243 | - * @method string ul(string $content, array $attr) |
|
| 243 | + * @method string ul(string $content, array $attr) |
|
| 244 | 244 | * creates an unordered list |
| 245 | - * @method string var(string $content, array $attr) |
|
| 245 | + * @method string var(string $content, array $attr) |
|
| 246 | 246 | * creates a variable |
| 247 | - * @method string video(string $content, array $attr) |
|
| 247 | + * @method string video(string $content, array $attr) |
|
| 248 | 248 | * creates embedded video content |
| 249 | - * @method string wbr(string $content, array $attr) |
|
| 249 | + * @method string wbr(string $content, array $attr) |
|
| 250 | 250 | * creates a possible line-break |
| 251 | - */ |
|
| 251 | + */ |
|
| 252 | 252 | |
| 253 | 253 | namespace HexMakina\Marker; |
| 254 | 254 | |
@@ -261,11 +261,11 @@ discard block |
||
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | /** |
| 264 | - * ? makes more sense to write |
|
| 265 | - * Marker::img('path/to/img.jpg', 'An alternative text', ['width' => 34, 'height' => 34]) |
|
| 266 | - * than |
|
| 267 | - * Marker::img(null, ['src' => 'path/to/img.jpg', 'alt' => 'An alternative text', 'width' => 34, 'height' => 34]) |
|
| 268 | - */ |
|
| 264 | + * ? makes more sense to write |
|
| 265 | + * Marker::img('path/to/img.jpg', 'An alternative text', ['width' => 34, 'height' => 34]) |
|
| 266 | + * than |
|
| 267 | + * Marker::img(null, ['src' => 'path/to/img.jpg', 'alt' => 'An alternative text', 'width' => 34, 'height' => 34]) |
|
| 268 | + */ |
|
| 269 | 269 | public static function img(string $src, string $alt, array $attributes = []): Element |
| 270 | 270 | { |
| 271 | 271 | $attributes['src'] ??= $src; |
@@ -275,11 +275,11 @@ discard block |
||
| 275 | 275 | return new Element('img', null, $attributes); |
| 276 | 276 | } |
| 277 | 277 | /** |
| 278 | - * ? makes more sense to write |
|
| 279 | - * Marker::a('controller/task/id', 'Click here', ['class' => 'nav']) |
|
| 280 | - * than |
|
| 281 | - * Marker::a('Click here', ['href' => controller/task/id', 'class' => 'nav']) |
|
| 282 | - */ |
|
| 278 | + * ? makes more sense to write |
|
| 279 | + * Marker::a('controller/task/id', 'Click here', ['class' => 'nav']) |
|
| 280 | + * than |
|
| 281 | + * Marker::a('Click here', ['href' => controller/task/id', 'class' => 'nav']) |
|
| 282 | + */ |
|
| 283 | 283 | public static function a(string $href, string $label, array $attributes = []): Element |
| 284 | 284 | { |
| 285 | 285 | $attributes['href'] ??= $href; |
@@ -3,11 +3,11 @@ |
||
| 3 | 3 | namespace HexMakina\Marker; |
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | - * @method static string hidden(string $name, $value=null) |
|
| 7 | - * @method static string date() |
|
| 8 | - * @method static string time() |
|
| 9 | - * @method static string datetime() |
|
| 10 | - */ |
|
| 6 | + * @method static string hidden(string $name, $value=null) |
|
| 7 | + * @method static string date() |
|
| 8 | + * @method static string time() |
|
| 9 | + * @method static string datetime() |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | class Form |
| 13 | 13 | { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | foreach ($list as $value => $label) { |
| 72 | 72 | $option_attributes = ['value' => $value]; |
| 73 | 73 | if ($selected == $value) { |
| 74 | - $option_attributes['selected'] = 'selected'; |
|
| 74 | + $option_attributes['selected'] = 'selected'; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | $options .= new Element('option', $label, $option_attributes); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | public static function legend(string $label, array $attributes = []): string |
| 84 | 84 | { |
| 85 | - return '' . (new Element('legend', $label, $attributes)); |
|
| 85 | + return ''.(new Element('legend', $label, $attributes)); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | public static function label(string $for, string $label, array $attributes = [], array $errors = []): string |
@@ -127,10 +127,10 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $label = ''; |
| 129 | 129 | if (isset($attributes['label'])) { |
| 130 | - $label = self::label($attributes['id'], $attributes['label'], [], ['' . $attributes['id'] => 'error']); |
|
| 130 | + $label = self::label($attributes['id'], $attributes['label'], [], [''.$attributes['id'] => 'error']); |
|
| 131 | 131 | unset($attributes['label']); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | - return $label . (new Element($tag, $content, $attributes)); |
|
| 134 | + return $label.(new Element($tag, $content, $attributes)); |
|
| 135 | 135 | } |
| 136 | 136 | } |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | $ret = ''; |
| 108 | 108 | foreach ($attributes as $k => $v) { |
| 109 | 109 | if (self::isValidValue($v)) { |
| 110 | - $ret .= ' ' . (self::isBooleanAttribute($k) ? $v : sprintf(self::FORMAT_ATTRIBUTES, $k, $v)); |
|
| 110 | + $ret .= ' '.(self::isBooleanAttribute($k) ? $v : sprintf(self::FORMAT_ATTRIBUTES, $k, $v)); |
|
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | foreach ($this->tags as $tag) { |
| 49 | 49 | $e = new Element($tag); |
| 50 | 50 | if ($e->isVoid()) { |
| 51 | - $this->assertEquals('<' . $tag . '/>', $e->__toString()); |
|
| 51 | + $this->assertEquals('<'.$tag.'/>', $e->__toString()); |
|
| 52 | 52 | } else { |
| 53 | 53 | $this->assertEquals(sprintf('<%s></%s>', $tag, $tag), $e->__toString()); |
| 54 | 54 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $e = new Element($tag, $message); |
| 69 | 69 | |
| 70 | 70 | if ($e->isVoid()) { |
| 71 | - $this->assertEquals('<' . $tag . '/>', $e->__toString()); |
|
| 71 | + $this->assertEquals('<'.$tag.'/>', $e->__toString()); |
|
| 72 | 72 | } else { |
| 73 | 73 | $this->assertEquals(sprintf('<%s>%s</%s>', $tag, $expected, $tag), $e->__toString()); |
| 74 | 74 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $this->assertForAllHTMLTags($message, $attributes, $attributes_expected_string); |
| 118 | 118 | |
| 119 | 119 | |
| 120 | - $attributes = ['class' => 'test_class', 'style="color:red;"','id' => 'test_id']; |
|
| 120 | + $attributes = ['class' => 'test_class', 'style="color:red;"', 'id' => 'test_id']; |
|
| 121 | 121 | $attributes_expected_string = ' class="test_class" style="color:red;" id="test_id"'; |
| 122 | 122 | |
| 123 | 123 | // testing attributes string generator |