From b8c283a695c8074a57d8c3dfa00934312638931d Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 19 Jul 2013 16:02:53 -0700 Subject: Dropping unecessary php: directive to function definitions in user guide --- user_guide_src/source/helpers/html_helper.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'user_guide_src/source/helpers/html_helper.rst') diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index df53ebd2f..cc0f2d3ab 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -19,7 +19,7 @@ The following functions are available: br() ==== -.. php:function:: br($count = 1) +.. function:: br($count = 1) :param int $count: Number of times to repeat the tag :returns: string @@ -34,7 +34,7 @@ The above would produce:


heading() ========= -.. php:function:: heading($data = '', $h = '1', $attributes = '') +.. function:: heading($data = '', $h = '1', $attributes = '') :param string $data: Content :param string $h: Heading level @@ -58,7 +58,7 @@ The above code produces:

Welcome!<

img() ===== -.. php:function:: img($src = '', $index_page = FALSE, $attributes = '') +.. function:: img($src = '', $index_page = FALSE, $attributes = '') :param string $src: Image source data :param bool $index_page: Whether to treat $src as a routed URI string @@ -101,7 +101,7 @@ Example:: link_tag() ========== -.. php:function:: ling_tag($href = '', $rel = 'stylesheet', $type = 'text/css', $title = '', $media = '', $index_page = FALSE) +.. function:: ling_tag($href = '', $rel = 'stylesheet', $type = 'text/css', $title = '', $media = '', $index_page = FALSE) :param string $href: What are we linking to :param string $rel: Relation type @@ -148,7 +148,7 @@ for complete control over all attributes and values:: nbs() ===== -.. php:function:: nbs($num = 1) +.. function:: nbs($num = 1) :param int $num: Number of space entities to produce :returns: string @@ -165,7 +165,7 @@ The above would produce:: ul() and ol() ============= -.. php:function:: ul($list, $attributes = '') +.. function:: ul($list, $attributes = '') :param array $list: List entries :param array $attributes: HTML attributes @@ -280,7 +280,7 @@ The above code will produce this:: -.. php:function:: ol($list, $attributes = '') +.. function:: ol($list, $attributes = '') :param array $list: List entries :param array $attributes: HTML attributes @@ -292,7 +292,7 @@ ordered lists instead of + ); + + echo ul($list, $attributes); + + The above code will produce this: + + .. code-block:: html + + .. function:: ol($list, $attributes = '') @@ -286,13 +293,11 @@ The above code will produce this:: :param array $attributes: HTML attributes :returns: string -Identical to :func:`ul()`, only it produces the
    tag for -ordered lists instead of
      . + Identical to :func:`ul()`, only it produces the
        tag for + ordered lists instead of
          . -meta() -====== -.. function:: meta($name = '', $content = '', $type = 'name', $newline = "\n") +.. function:: meta([$name = ''[, $content = ''[, $type = 'name'[, $newline = "\n"]]]]) :param string $name: Meta name :param string $content: Meta content @@ -300,109 +305,107 @@ meta() :param string $newline: Newline character :returns: string -Helps you generate meta tags. You can pass strings to the function, or -simple arrays, or multidimensional ones. - -Examples:: - - echo meta('description', 'My Great site'); - // Generates: - - echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); - // Note the third parameter. Can be "equiv" or "name" - // Generates: - - echo meta(array('name' => 'robots', 'content' => 'no-cache')); - // Generates: - - $meta = array( - array( - 'name' => 'robots', - 'content' => 'no-cache' - ), - array( - 'name' => 'description', - 'content' => 'My Great Site' - ), - array( - 'name' => 'keywords', - 'content' => 'love, passion, intrigue, deception' - ), - array( - 'name' => 'robots', - 'content' => 'no-cache' - ), - array( - 'name' => 'Content-type', - 'content' => 'text/html; charset=utf-8', 'type' => 'equiv' - ) - ); - - echo meta($meta); - // Generates: - // - // - // - // - // - -doctype() -========= - -.. function:: doctype($type = 'xhtml1-strict') + Helps you generate meta tags. You can pass strings to the function, or + simple arrays, or multidimensional ones. + + Examples:: + + echo meta('description', 'My Great site'); + // Generates: + + echo meta('Content-type', 'text/html; charset=utf-8', 'equiv'); + // Note the third parameter. Can be "equiv" or "name" + // Generates: + + echo meta(array('name' => 'robots', 'content' => 'no-cache')); + // Generates: + + $meta = array( + array( + 'name' => 'robots', + 'content' => 'no-cache' + ), + array( + 'name' => 'description', + 'content' => 'My Great Site' + ), + array( + 'name' => 'keywords', + 'content' => 'love, passion, intrigue, deception' + ), + array( + 'name' => 'robots', + 'content' => 'no-cache' + ), + array( + 'name' => 'Content-type', + 'content' => 'text/html; charset=utf-8', 'type' => 'equiv' + ) + ); + + echo meta($meta); + // Generates: + // + // + // + // + // + + +.. function:: doctype([$type = 'xhtml1-strict']) :param string $type: Doctype name -Helps you generate document type declarations, or DTD's. XHTML 1.0 -Strict is used by default, but many doctypes are available. - -Example:: - - echo doctype(); // - - echo doctype('html4-trans'); // - -The following is a list of doctype choices. These are configurable, and -pulled from application/config/doctypes.php - -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| Doctype | Option | Result | -+===============================+==============================+==================================================================================================================================================+ -| XHTML 1.1 | doctype('xhtml11') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| XHTML 1.0 Strict | doctype('xhtml1-strict') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| XHTML 1.0 Transitional | doctype('xhtml1-trans') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| XHTML 1.0 Frameset | doctype('xhtml1-frame') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| XHTML Basic 1.1 | doctype('xhtml-basic11') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| HTML 5 | doctype('html5') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| HTML 4 Strict | doctype('html4-strict') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| HTML 4 Transitional | doctype('html4-trans') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| HTML 4 Frameset | doctype('html4-frame') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| MathML 1.01 | doctype('mathml1') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| MathML 2.0 | doctype('mathml2') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| SVG 1.0 | doctype('svg10') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| SVG 1.1 Full | doctype('svg11') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| SVG 1.1 Basic | doctype('svg11-basic') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| SVG 1.1 Tiny | doctype('svg11-tiny') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| XHTML+MathML+SVG (XHTML host) | doctype('xhtml-math-svg-xh') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| XHTML+MathML+SVG (SVG host) | doctype('xhtml-math-svg-sh') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| XHTML+RDFa 1.0 | doctype('xhtml-rdfa-1') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| XHTML+RDFa 1.1 | doctype('xhtml-rdfa-2') | | -+-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ \ No newline at end of file + Helps you generate document type declarations, or DTD's. XHTML 1.0 + Strict is used by default, but many doctypes are available. + + Example:: + + echo doctype(); // + + echo doctype('html4-trans'); // + + The following is a list of doctype choices. These are configurable, and + pulled from application/config/doctypes.php + + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | Doctype | Option | Result | + +===============================+==============================+==================================================================================================================================================+ + | XHTML 1.1 | doctype('xhtml11') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | XHTML 1.0 Strict | doctype('xhtml1-strict') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | XHTML 1.0 Transitional | doctype('xhtml1-trans') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | XHTML 1.0 Frameset | doctype('xhtml1-frame') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | XHTML Basic 1.1 | doctype('xhtml-basic11') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | HTML 5 | doctype('html5') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | HTML 4 Strict | doctype('html4-strict') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | HTML 4 Transitional | doctype('html4-trans') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | HTML 4 Frameset | doctype('html4-frame') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | MathML 1.01 | doctype('mathml1') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | MathML 2.0 | doctype('mathml2') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | SVG 1.0 | doctype('svg10') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | SVG 1.1 Full | doctype('svg11') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | SVG 1.1 Basic | doctype('svg11-basic') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | SVG 1.1 Tiny | doctype('svg11-tiny') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | XHTML+MathML+SVG (XHTML host) | doctype('xhtml-math-svg-xh') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | XHTML+MathML+SVG (SVG host) | doctype('xhtml-math-svg-sh') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | XHTML+RDFa 1.0 | doctype('xhtml-rdfa-1') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | XHTML+RDFa 1.1 | doctype('xhtml-rdfa-2') | | + +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 3de130c2da3b93a3404f264e92d7b65354de3548 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Feb 2014 23:31:49 +0200 Subject: [ci skip] Add return types to helper docs (+ some other formatting) --- user_guide_src/source/helpers/html_helper.rst | 97 ++++++++++++--------------- 1 file changed, 42 insertions(+), 55 deletions(-) (limited to 'user_guide_src/source/helpers/html_helper.rst') diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index 9e9d7ca62..3324da8c0 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -28,7 +28,8 @@ The following functions are available: .. function:: br([$count = 1]) :param int $count: Number of times to repeat the tag - :returns: string + :returns: HTML line break tag + :rtype: string Generates line break tags (
          ) based on the number you submit. Example:: @@ -41,13 +42,13 @@ The following functions are available:


          - .. function:: heading([$data = ''[, $h = '1'[, $attributes = '']]]) :param string $data: Content :param string $h: Heading level :param array $attributes: HTML attributes - :returns: string + :returns: HTML heading tag + :rtype: string Lets you create HTML heading tags. The first parameter will contain the data, the second the size of the heading. Example:: @@ -67,13 +68,13 @@ The following functions are available:

          Welcome!

          - .. function:: img([$src = ''[, $index_page = FALSE[, $attributes = '']]]) :param string $src: Image source data :param bool $index_page: Whether to treat $src as a routed URI string :param array $attributes: HTML attributes - :returns: string + :returns: HTML image tag + :rtype: string Lets you create HTML tags. The first parameter contains the image source. Example:: @@ -106,8 +107,7 @@ The following functions are available: img($image_properties); // Me, demonstrating how to eat 4 slices of pizza at one time - -.. function:: ling_tag([$href = ''[, $rel = 'stylesheet'[, $type = 'text/css'[, $title = ''[, $media = ''[, $index_page = FALSE]]]]]]) +.. function:: link_tag([$href = ''[, $rel = 'stylesheet'[, $type = 'text/css'[, $title = ''[, $media = ''[, $index_page = FALSE]]]]]]) :param string $href: What are we linking to :param string $rel: Relation type @@ -115,7 +115,8 @@ The following functions are available: :param string $title: Link title :param string $media: Media type :param bool $index_page: Whether to treat $src as a routed URI string - :returns: string + :returns: HTML link tag + :rtype: string Lets you create HTML tags. This is useful for stylesheet links, as well as other links. The parameters are *href*, with optional *rel*, @@ -150,11 +151,11 @@ The following functions are available: echo link_tag($link); // - .. function:: nbs([$num = 1]) :param int $num: Number of space entities to produce - :returns: string + :returns: A sequence of non-breaking space HTML entities + :rtype: string Generates non-breaking spaces ( ) based on the number you submit. Example:: @@ -172,7 +173,8 @@ The following functions are available: :param array $list: List entries :param array $attributes: HTML attributes - :returns: string + :returns: HTML-formatted unordered list + :rtype: string Permits you to generate ordered or unordered HTML lists from simple or multi-dimensional arrays. Example:: @@ -291,19 +293,20 @@ The following functions are available: :param array $list: List entries :param array $attributes: HTML attributes - :returns: string + :returns: HTML-formatted ordered list + :rtype: string Identical to :func:`ul()`, only it produces the
            tag for ordered lists instead of
              . - .. function:: meta([$name = ''[, $content = ''[, $type = 'name'[, $newline = "\n"]]]]) :param string $name: Meta name :param string $content: Meta content :param string $type: Meta type :param string $newline: Newline character - :returns: string + :returns: HTML meta tag + :rtype: string Helps you generate meta tags. You can pass strings to the function, or simple arrays, or multidimensional ones. @@ -355,6 +358,8 @@ The following functions are available: .. function:: doctype([$type = 'xhtml1-strict']) :param string $type: Doctype name + :returns: HTML DocType tag + :rtype: string Helps you generate document type declarations, or DTD's. XHTML 1.0 Strict is used by default, but many doctypes are available. @@ -368,44 +373,26 @@ The following functions are available: The following is a list of doctype choices. These are configurable, and pulled from application/config/doctypes.php - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | Doctype | Option | Result | - +===============================+==============================+==================================================================================================================================================+ - | XHTML 1.1 | doctype('xhtml11') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | XHTML 1.0 Strict | doctype('xhtml1-strict') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | XHTML 1.0 Transitional | doctype('xhtml1-trans') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | XHTML 1.0 Frameset | doctype('xhtml1-frame') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | XHTML Basic 1.1 | doctype('xhtml-basic11') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | HTML 5 | doctype('html5') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | HTML 4 Strict | doctype('html4-strict') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | HTML 4 Transitional | doctype('html4-trans') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | HTML 4 Frameset | doctype('html4-frame') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | MathML 1.01 | doctype('mathml1') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | MathML 2.0 | doctype('mathml2') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | SVG 1.0 | doctype('svg10') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | SVG 1.1 Full | doctype('svg11') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | SVG 1.1 Basic | doctype('svg11-basic') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | SVG 1.1 Tiny | doctype('svg11-tiny') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | XHTML+MathML+SVG (XHTML host) | doctype('xhtml-math-svg-xh') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | XHTML+MathML+SVG (SVG host) | doctype('xhtml-math-svg-sh') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | XHTML+RDFa 1.0 | doctype('xhtml-rdfa-1') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | XHTML+RDFa 1.1 | doctype('xhtml-rdfa-2') | | - +-------------------------------+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ \ No newline at end of file + =============================== =================== ================================================================================================================================================== + Document type Option Result + =============================== =================== ================================================================================================================================================== + XHTML 1.1 xhtml11 + XHTML 1.0 Strict xhtml1-strict + XHTML 1.0 Transitional xhtml1-trans + XHTML 1.0 Frameset xhtml1-frame + XHTML Basic 1.1 xhtml-basic11 + HTML 5 html5 + HTML 4 Strict html4-strict + HTML 4 Transitional html4-trans + HTML 4 Frameset html4-frame + MathML 1.01 mathml1 + MathML 2.0 mathml2 + SVG 1.0 svg10 + SVG 1.1 Full svg11 + SVG 1.1 Basic svg11-basic + SVG 1.1 Tiny svg11-tiny + XHTML+MathML+SVG (XHTML host) xhtml-math-svg-xh + XHTML+MathML+SVG (SVG host) xhtml-math-svg-sh + XHTML+RDFa 1.0 xhtml-rdfa-1 + XHTML+RDFa 1.1 xhtml-rdfa-2 + =============================== =================== ================================================================================================================================================== \ No newline at end of file -- cgit v1.2.3-24-g4f1b