From dc2ad8fc00fdcb1e8086ee9a6e8d2ff28985eebf Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 4 Oct 2007 00:34:26 +0000 Subject: documentation --- it_html.class | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/it_html.class b/it_html.class index 4899c7e..a007aad 100644 --- a/it_html.class +++ b/it_html.class @@ -135,8 +135,8 @@ function html($args) * 'content-type' optional content type (default: "text/html; charset=iso-8859-1") * 'description' optional data for tag * 'keywords' optional data for tag - * 'lang' optional language (defaults to 'de') * 'stylesheets' optional array mediatype => url of styleshests + * 'title' optional content of , will be html encoded */ function head($args = array()) { @@ -233,7 +233,18 @@ function _parse_args($args) /** - * INTERNAL: Create html tag from name and args array + * function div($args...) + * Return a <div>...</div> element + * Any strings in the argument list will be content of the <div> + * Any associative arrays among the arguments will create attributes for <div>. + * Attributes with values false or null will be omitted completely. + * Attributes with value true can be used for boolean attributes like 'checked' + * Attribute values will be html encoded, content values won't so you may need to use Q(). + * @see _tag + */ + +/** + * INTERNAL: Create html tag from name and args array (the arguments of the parent function) */ function _tag($name, $args) { @@ -289,15 +300,6 @@ function tag($args) return $this->_tag($name, $args); } -/** - * function div($args...) - * creates a <div>...</div> element with any strings from $args as content. - * any associative arrays among the arguments will create attributes for <div>. - * attributes with values false or null will be omitted completely. - * attributes with value true can be used for boolean attributes like 'checked' - * attributes values are html encoded, content values are not so you may need to use Q(). - */ - /** * Special img() function patches png transparency for IE 5.5-6 if ie_png_fix is set * @param ... any number optional data or array of key => value arguments @@ -323,9 +325,10 @@ function img($args) * Create a dropdown menu object. Warning: encodes html code within options! * @param $tags key => value pairs of <select> tag * @param $options array (value => text) of available options or - * string key:val{,key:val} where key will be rawurldecoded so it may contain %2C as comma + * string key:val{,key:val} where key will be rawurldecoded so it may contain %2C as comma * supports optgroups as array (value => optgroup => array(value => text)) * @param $selected optional currently selected value, or comma-separated list or array for multi-select + * Note: use tag('select') and tag('option') if you want do roll your own */ function select($tags, $options, $selected = null) { -- cgit v1.2.3