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/language_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/helpers/language_helper.rst') diff --git a/user_guide_src/source/helpers/language_helper.rst b/user_guide_src/source/helpers/language_helper.rst index 1911e3bfd..2b2342f16 100644 --- a/user_guide_src/source/helpers/language_helper.rst +++ b/user_guide_src/source/helpers/language_helper.rst @@ -19,7 +19,7 @@ The following functions are available: lang() ====== -.. php:function:: lang($line, $for = '', $attributes = array()) +.. function:: lang($line, $for = '', $attributes = array()) :param string $line: Language line key :param string $for: HTML "for" attribute (ID of the element we're creating a label for) @@ -27,7 +27,7 @@ lang() :returns: string This function returns a line of text from a loaded language file with -simplified syntax that may be more desirable for view files than +simplified syntax that may be more desirable for view files than ``CI_Lang::line()``. Example:: -- cgit v1.2.3-24-g4f1b From 49c43c4449b6e0f217e7da451645b6ad7b15653e Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 19 Jul 2013 16:51:08 -0700 Subject: Update Language helper docs --- user_guide_src/source/helpers/language_helper.rst | 34 +++++++++++++---------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'user_guide_src/source/helpers/language_helper.rst') diff --git a/user_guide_src/source/helpers/language_helper.rst b/user_guide_src/source/helpers/language_helper.rst index 2b2342f16..9e5d9bdc9 100644 --- a/user_guide_src/source/helpers/language_helper.rst +++ b/user_guide_src/source/helpers/language_helper.rst @@ -5,7 +5,12 @@ Language Helper The Language Helper file contains functions that assist in working with language files. -.. contents:: Page Contents +.. contents:: + :local: + +.. raw:: html + +
Loading this Helper =================== @@ -14,23 +19,24 @@ This helper is loaded using the following code:: $this->load->helper('language'); +Available Functions +=================== + The following functions are available: -lang() -====== -.. function:: lang($line, $for = '', $attributes = array()) +.. function:: lang($line[, $for = ''[, $attributes = array()]]) - :param string $line: Language line key - :param string $for: HTML "for" attribute (ID of the element we're creating a label for) - :param array $attributes: Any additional HTML attributes - :returns: string + :param string $line: Language line key + :param string $for: HTML "for" attribute (ID of the element we're creating a label for) + :param array $attributes: Any additional HTML attributes + :returns: string -This function returns a line of text from a loaded language file with -simplified syntax that may be more desirable for view files than -``CI_Lang::line()``. + This function returns a line of text from a loaded language file with + simplified syntax that may be more desirable for view files than + ``CI_Lang::line()``. -Example:: + Example:: - echo lang('language_key', 'form_item_id', array('class' => 'myClass'); - // Outputs: \ No newline at end of file + echo lang('language_key', 'form_item_id', array('class' => 'myClass'); + // Outputs: \ 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/language_helper.rst | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'user_guide_src/source/helpers/language_helper.rst') diff --git a/user_guide_src/source/helpers/language_helper.rst b/user_guide_src/source/helpers/language_helper.rst index 9e5d9bdc9..e4d093725 100644 --- a/user_guide_src/source/helpers/language_helper.rst +++ b/user_guide_src/source/helpers/language_helper.rst @@ -27,16 +27,17 @@ The following functions are available: .. function:: lang($line[, $for = ''[, $attributes = array()]]) - :param string $line: Language line key - :param string $for: HTML "for" attribute (ID of the element we're creating a label for) - :param array $attributes: Any additional HTML attributes - :returns: string + :param string $line: Language line key + :param string $for: HTML "for" attribute (ID of the element we're creating a label for) + :param array $attributes: Any additional HTML attributes + :returns: HTML-formatted language line label + :rtype: string - This function returns a line of text from a loaded language file with - simplified syntax that may be more desirable for view files than - ``CI_Lang::line()``. + This function returns a line of text from a loaded language file with + simplified syntax that may be more desirable for view files than + ``CI_Lang::line()``. - Example:: + Example:: - echo lang('language_key', 'form_item_id', array('class' => 'myClass'); - // Outputs: \ No newline at end of file + echo lang('language_key', 'form_item_id', array('class' => 'myClass')); + // Outputs: \ No newline at end of file -- cgit v1.2.3-24-g4f1b