From 445a86adf3d002559947b287261054683a369594 Mon Sep 17 00:00:00 2001 From: secretr Date: Fri, 4 Dec 2009 18:52:19 +0000 Subject: [PATCH] featurebox front handlers - work in progress --- e107_plugins/featurebox/includes/category.php | 65 +++++++++++++++++++ e107_plugins/featurebox/includes/item.php | 22 +++++++ e107_plugins/featurebox/includes/tree.php | 47 ++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 e107_plugins/featurebox/includes/category.php create mode 100644 e107_plugins/featurebox/includes/item.php create mode 100644 e107_plugins/featurebox/includes/tree.php diff --git a/e107_plugins/featurebox/includes/category.php b/e107_plugins/featurebox/includes/category.php new file mode 100644 index 000000000..b3f85c535 --- /dev/null +++ b/e107_plugins/featurebox/includes/category.php @@ -0,0 +1,65 @@ +_tree) + { + $this->_tree = new plugin_featurebox_tree(); + $options = array(); // TODO options + $this->_tree->load($this->getId(), $options, $force); + } + + return $this->_tree; + } + + /** + * Set item tree + * + * @param plugin_featurebox_tree $category_tree + * @return plugin_featurebox_category + */ + public function setTree($category_tree) + { + $this->_tree = $category_tree; + return $this; + } +} \ No newline at end of file diff --git a/e107_plugins/featurebox/includes/item.php b/e107_plugins/featurebox/includes/item.php new file mode 100644 index 000000000..957c1d187 --- /dev/null +++ b/e107_plugins/featurebox/includes/item.php @@ -0,0 +1,22 @@ +isEmpty()) + { + return $this; + } + + $this->setParams(array( + 'model_class' => 'plugin_featurebox_item', + 'model_message_stack' => 'featurebox' + )); + + // TODO - options -> limit, random; set param 'db_query' + + parent::load($force); + + return $this; + } +} \ No newline at end of file