mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-24 17:06:52 +01:00
19 lines
334 B
PHP
19 lines
334 B
PHP
<?php
|
|
|
|
Yii::import('zii.widgets.CPortlet');
|
|
|
|
class RecentComments extends CPortlet
|
|
{
|
|
public $title='Recent Comments';
|
|
public $maxComments=10;
|
|
|
|
public function getRecentComments()
|
|
{
|
|
return Comment::model()->findRecentComments($this->maxComments);
|
|
}
|
|
|
|
protected function renderContent()
|
|
{
|
|
$this->render('recentComments');
|
|
}
|
|
} |