[ Index ] |
|
Code source de PRADO 3.0.6 |
1 <?php 2 /** 3 * CategoryPortlet class file 4 * 5 * @author Qiang Xue <qiang.xue@gmail.com> 6 * @link http://www.pradosoft.com/ 7 * @copyright Copyright © 2006 PradoSoft 8 * @license http://www.pradosoft.com/license/ 9 * @version $Id: CategoryPortlet.php 1397 2006-09-07 07:55:53Z wei $ 10 */ 11 12 Prado::using('Application.Portlets.Portlet'); 13 14 /** 15 * CategoryPortlet class 16 * 17 * @author Qiang Xue <qiang.xue@gmail.com> 18 * @link http://www.pradosoft.com/ 19 * @copyright Copyright © 2006 PradoSoft 20 * @license http://www.pradosoft.com/license/ 21 */ 22 class CategoryPortlet extends Portlet 23 { 24 public function onLoad($param) 25 { 26 parent::onLoad($param); 27 $cats=$this->Application->getModule('data')->queryCategories(); 28 foreach($cats as $cat) 29 { 30 $cat->ID=$this->Service->constructUrl('Posts.ListPost',array('cat'=>$cat->ID)); 31 $cat->Name.=' (' . $cat->PostCount .')'; 32 } 33 $this->CategoryList->DataSource=$cats; 34 $this->CategoryList->dataBind(); 35 } 36 } 37 38 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |