2
2
HTML Helper
3
3
###########
4
4
5
- The HTML Helper file contains functions that assist in working with
6
- HTML.
5
+ The HTML Helper file contains functions that assist in working with HTML.
7
6
8
7
.. contents ::
9
8
:local:
@@ -31,10 +30,10 @@ The following functions are available:
31
30
:param string|array $src: Image source URI, or array of attributes and values
32
31
:param bool $indexPage: Whether to treat ``$src `` as a routed URI string
33
32
:param mixed $attributes: Additional HTML attributes
34
- :returns: HTML image tag
33
+ :returns: HTML image element
35
34
:rtype: string
36
35
37
- Lets you create HTML ``<img / > `` tags . The first parameter contains the
36
+ Lets you create HTML ``<img> `` elements . The first parameter contains the
38
37
image source. Example:
39
38
40
39
.. literalinclude :: html_helper/002.php
@@ -84,10 +83,10 @@ The following functions are available:
84
83
:param string $media: Media type
85
84
:param bool $indexPage: Whether to treat ``$src `` as a routed URI string
86
85
:param string $hreflang: Hreflang type
87
- :returns: HTML link tag
86
+ :returns: An HTML link element
88
87
:rtype: string
89
88
90
- Lets you create HTML ``<link / > `` tags . This is useful for stylesheet links,
89
+ Lets you create HTML ``<link> `` elements . This is useful for stylesheet links,
91
90
as well as other links. The parameters are *href *, with optional *rel *,
92
91
*type *, *title *, *media * and *indexPage *.
93
92
@@ -111,10 +110,10 @@ The following functions are available:
111
110
112
111
:param array|string $src: The source name or URL of a JavaScript file, or an associative array specifying the attributes
113
112
:param bool $indexPage: Whether to treat ``$src `` as a routed URI string
114
- :returns: HTML script tag
113
+ :returns: An HTML script element
115
114
:rtype: string
116
115
117
- Lets you create HTML ``<script></script> `` tags . The parameters is *src *, with optional *indexPage *.
116
+ Lets you create HTML ``<script> `` elements . The parameters are *src * and optional *indexPage *.
118
117
119
118
*indexPage * is a boolean value that specifies if the *src * should have
120
119
the page specified by ``$config['indexPage'] `` added to the address it creates.
@@ -132,11 +131,11 @@ The following functions are available:
132
131
133
132
:param array $list: List entries
134
133
:param array $attributes: HTML attributes
135
- :returns: HTML-formatted unordered list
134
+ :returns: An HTML unordered list element
136
135
:rtype: string
137
136
138
- Permits you to generate unordered HTML lists from simple or
139
- multi-dimensional arrays . Example:
137
+ Permits you to generate an unordered HTML list from a simple or
138
+ multi-dimensional array . Example:
140
139
141
140
.. literalinclude :: html_helper/012.php
142
141
@@ -205,20 +204,20 @@ The following functions are available:
205
204
206
205
:param array $list: List entries
207
206
:param array $attributes: HTML attributes
208
- :returns: HTML-formatted ordered list
207
+ :returns: An HTML ordered list element
209
208
:rtype: string
210
209
211
- Identical to :php:func: `ul() `, only it produces the ``<ol> `` tag for
210
+ Identical to :php:func: `ul() `, only it produces ``<ol> `` element for
212
211
ordered lists instead of ``<ul> ``.
213
212
214
213
.. php :function :: video($src[, $unsupportedMessage = ''[, $attributes = ''[, $tracks = [][, $indexPage = false]]]])
215
214
216
215
:param mixed $src: Either a source string or an array of sources. See :php:func: `source() ` function
217
- :param string $unsupportedMessage: The message to display if the media tag is not supported by the browser
216
+ :param string $unsupportedMessage: The message to display if the video element is not supported by the browser
218
217
:param string $attributes: HTML attributes
219
218
:param array $tracks: Use the track function inside an array. See :php:func: `track() ` function
220
219
:param bool $indexPage:
221
- :returns: HTML-formatted video element
220
+ :returns: An HTML video element
222
221
:rtype: string
223
222
224
223
Permits you to generate HTML video element from simple or
@@ -253,24 +252,24 @@ The following functions are available:
253
252
.. php :function :: audio($src[, $unsupportedMessage = ''[, $attributes = ''[, $tracks = [][, $indexPage = false]]]])
254
253
255
254
:param mixed $src: Either a source string or an array of sources. See :php:func: `source() ` function
256
- :param string $unsupportedMessage: The message to display if the media tag is not supported by the browser
255
+ :param string $unsupportedMessage: The message to display if the audio element is not supported by the browser
257
256
:param string $attributes:
258
257
:param array $tracks: Use the track function inside an array. See :php:func: `track() ` function
259
258
:param bool $indexPage:
260
- :returns: HTML-formatted audio element
259
+ :returns: An HTML audio element
261
260
:rtype: string
262
261
263
- Identical to :php:func: `video() `, only it produces the ``<audio> `` tag instead of ``<video> ``.
262
+ Identical to :php:func: `video() `, only it produces ``<audio> `` element instead of ``<video> ``.
264
263
265
264
.. php :function :: source($src = ''[, $type = false[, $attributes = '']])
266
265
267
266
:param string $src: The path of the media resource
268
267
:param bool $type: The MIME-type of the resource with optional codecs parameters
269
268
:param array $attributes: HTML attributes
270
- :returns: HTML source tag
269
+ :returns: An HTML source element
271
270
:rtype: string
272
271
273
- Lets you create HTML ``<source / > `` tags . The first parameter contains the
272
+ Lets you create HTML ``<source> `` elements . The first parameter contains the
274
273
source source. Example:
275
274
276
275
.. literalinclude :: html_helper/015.php
@@ -281,10 +280,10 @@ The following functions are available:
281
280
:param bool $type: MIME-type
282
281
:param array $attributes: HTML attributes
283
282
:param bool $indexPage:
284
- :returns: HTML embed tag
283
+ :returns: An HTML embed element
285
284
:rtype: string
286
285
287
- Lets you create HTML ``<embed / > `` tags . The first parameter contains the
286
+ Lets you create HTML ``<embed> `` elements . The first parameter contains the
288
287
embed source. Example:
289
288
290
289
.. literalinclude :: html_helper/016.php
@@ -295,10 +294,10 @@ The following functions are available:
295
294
:param bool $type: Content-type of the resource
296
295
:param array $attributes: HTML attributes
297
296
:param array $params: Use the param function inside an array. See :php:func: `param() ` function
298
- :returns: HTML object tag
297
+ :returns: An HTML object element
299
298
:rtype: string
300
299
301
- Lets you create HTML ``<object / > `` tags . The first parameter contains the
300
+ Lets you create HTML ``<object> `` elements . The first parameter contains the
302
301
object data. Example:
303
302
304
303
.. literalinclude :: html_helper/017.php
@@ -319,10 +318,10 @@ The following functions are available:
319
318
:param string $name: The name of the parameter
320
319
:param string $value: The value of the parameter
321
320
:param array $attributes: HTML attributes
322
- :returns: HTML param tag
321
+ :returns: An HTML param element
323
322
:rtype: string
324
323
325
- Lets you create HTML ``<param / > `` tags . The first parameter contains the
324
+ Lets you create HTML ``<param> `` elements . The first parameter contains the
326
325
param source. Example:
327
326
328
327
.. literalinclude :: html_helper/018.php
@@ -332,7 +331,7 @@ The following functions are available:
332
331
:param string $name: The name of the parameter
333
332
:param string $value: The value of the parameter
334
333
:param array $attributes: HTML attributes
335
- :returns: HTML track tag
334
+ :returns: An HTML track element
336
335
:rtype: string
337
336
338
337
Generates a track element to specify timed tracks. The tracks are
@@ -343,10 +342,10 @@ The following functions are available:
343
342
.. php :function :: doctype([$type = 'html5'])
344
343
345
344
:param string $type: Doctype name
346
- :returns: HTML DocType tag
345
+ :returns: An HTML DocType declaration
347
346
:rtype: string
348
347
349
- Helps you generate document type declarations, or DTD's. HTML 5
348
+ Helps you generate document type declarations ( DTD's) . HTML 5
350
349
is used by default, but many doctypes are available.
351
350
352
351
Example:
0 commit comments