summaryrefslogtreecommitdiffstats
path: root/system/libraries/Table.php
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2012-02-24 15:38:35 +0100
committerMike Funk <mfunk@xulonpress.com>2012-02-24 15:38:35 +0100
commit46e3a9a365e6bae7954f5118db1409faa5f5decd (patch)
tree1853efb0fe223624d02e99d8ddb748c2400641e4 /system/libraries/Table.php
parentceec45609be0ebc2319e9e21a25eb1642f4eef06 (diff)
added config check, changelog entry, and user guide update.
Diffstat (limited to 'system/libraries/Table.php')
-rw-r--r--system/libraries/Table.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index fb154e50f..de5a6ba3a 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -49,9 +49,23 @@ class CI_Table {
public $empty_cells = '';
public $function = FALSE;
- public function __construct()
+ // --------------------------------------------------------------------------
+
+ /**
+ * Set the template from the table config file if it exists
+ *
+ * @param array $config (default: array())
+ * @return void
+ */
+ public function __construct($config = array())
{
log_message('debug', "Table Class Initialized");
+
+ // initialize config
+ foreach ($config as $key => $val)
+ {
+ $this->template[$key] = $val;
+ }
}
// --------------------------------------------------------------------