summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries/table.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-08 03:27:48 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-08 03:27:48 +0100
commit28c2c975b118016d07212ed8e7c22ff280309f82 (patch)
treef1552392a3d87efebd7c565c6414ae41dc208ee9 /user_guide_src/source/libraries/table.rst
parent9228f85b1b4f59cc88ba7c4addc258a7a5fd0ac0 (diff)
[ci skip] Add return types to library docs
Diffstat (limited to 'user_guide_src/source/libraries/table.rst')
-rw-r--r--user_guide_src/source/libraries/table.rst35
1 files changed, 19 insertions, 16 deletions
diff --git a/user_guide_src/source/libraries/table.rst b/user_guide_src/source/libraries/table.rst
index ed085f781..ea0c417c4 100644
--- a/user_guide_src/source/libraries/table.rst
+++ b/user_guide_src/source/libraries/table.rst
@@ -158,15 +158,16 @@ Class Reference
.. method:: generate([$table_data = NULL])
- :param mixed $table_data: data to populate the table rows with
- :returns: string
+ :param mixed $table_data: Data to populate the table rows with
+ :returns: HTML table
+ :rtype: string
Returns a string containing the generated table. Accepts an optional parameter which can be an array or a database result object.
.. method:: set_caption($caption)
- :param string $caption: table caption
- :returns: void
+ :param string $caption: Table caption
+ :rtype: void
Permits you to add a caption to the table.
::
@@ -175,8 +176,8 @@ Class Reference
.. method:: set_heading([$args = array()[, ...]])
- :param mixed $args: an array or multiple strings containing the table column titles
- :returns: void
+ :param mixed $args: An array or multiple strings containing the table column titles
+ :rtype: void
Permits you to set the table heading. You can submit an array or discrete params::
@@ -186,8 +187,8 @@ Class Reference
.. method:: add_row([$args = array()[, ...]])
- :param mixed $args: an array or multiple strings containing the row values
- :returns: void
+ :param mixed $args: An array or multiple strings containing the row values
+ :rtype: void
Permits you to add a row to your table. You can submit an array or discrete params::
@@ -206,9 +207,10 @@ Class Reference
.. method:: make_columns([$array = array()[, $col_limit = 0]])
- :param array $array: an array containing multiple rows' data
- :param int $col_limit: count of columns in the table
- :returns: array
+ :param array $array: An array containing multiple rows' data
+ :param int $col_limit: Count of columns in the table
+ :returns: An array of HTML table columns
+ :rtype: array
This method takes a one-dimensional array as input and creates a multi-dimensional array with a depth equal to the number of columns desired.
This allows a single array with many elements to be displayed in a table that has a fixed column count. Consider this example::
@@ -235,8 +237,9 @@ Class Reference
.. method:: set_template($template)
- :param array $template: associative array containing template values
- :returns: bool
+ :param array $template: An associative array containing template values
+ :returns: TRUE on success, FALSE on failure
+ :rtype: bool
Permits you to set your template. You can submit a full or partial template.
::
@@ -249,8 +252,8 @@ Class Reference
.. method:: set_empty($value)
- :param mixed $value: value to put in empty cells
- :returns: void
+ :param mixed $value: Value to put in empty cells
+ :rtype: void
Lets you set a default value for use in any table cells that are empty.
You might, for example, set a non-breaking space::
@@ -259,7 +262,7 @@ Class Reference
.. method:: clear()
- :returns: void
+ :rtype: void
Lets you clear the table heading and row data. If you need to show multiple tables with different data you should to call this method
after each table has been generated to clear the previous table information. Example::