summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Portlets/CategoryPortlet.php
diff options
context:
space:
mode:
Diffstat (limited to 'demos/blog/protected/Portlets/CategoryPortlet.php')
-rw-r--r--demos/blog/protected/Portlets/CategoryPortlet.php74
1 files changed, 37 insertions, 37 deletions
diff --git a/demos/blog/protected/Portlets/CategoryPortlet.php b/demos/blog/protected/Portlets/CategoryPortlet.php
index d95b0661..0b451db8 100644
--- a/demos/blog/protected/Portlets/CategoryPortlet.php
+++ b/demos/blog/protected/Portlets/CategoryPortlet.php
@@ -1,38 +1,38 @@
-<?php
-/**
- * CategoryPortlet class file
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2006 PradoSoft
- * @license http://www.pradosoft.com/license/
- * @version $Id$
- */
-
-Prado::using('Application.Portlets.Portlet');
-
-/**
- * CategoryPortlet class
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2006 PradoSoft
- * @license http://www.pradosoft.com/license/
- */
-class CategoryPortlet extends Portlet
-{
- public function onLoad($param)
- {
- parent::onLoad($param);
- $cats=$this->Application->getModule('data')->queryCategories();
- foreach($cats as $cat)
- {
- $cat->ID=$this->Service->constructUrl('Posts.ListPost',array('cat'=>$cat->ID));
- $cat->Name.=' (' . $cat->PostCount .')';
- }
- $this->CategoryList->DataSource=$cats;
- $this->CategoryList->dataBind();
- }
-}
-
+<?php
+/**
+ * CategoryPortlet class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Id$
+ */
+
+Prado::using('Application.Portlets.Portlet');
+
+/**
+ * CategoryPortlet class
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ */
+class CategoryPortlet extends Portlet
+{
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ $cats=$this->Application->getModule('data')->queryCategories();
+ foreach($cats as $cat)
+ {
+ $cat->ID=$this->Service->constructUrl('Posts.ListPost',array('cat'=>$cat->ID));
+ $cat->Name.=' (' . $cat->PostCount .')';
+ }
+ $this->CategoryList->DataSource=$cats;
+ $this->CategoryList->dataBind();
+ }
+}
+
?> \ No newline at end of file