0

I want to call controller method from yii extension in specific condition to trigger partial render

<?php
require_once (Yii::app ()->basePath . '/controllers/SiteController.php';
$obj = new SiteController();
$obj->actionGetscore();
print_r($obj);
.....
.....
?>

1 Answers1

0

Yii::app()->controller->actionGetscore(); ?
Yii::app()->controller->renderPartial(); ?
Yii::app()->controller->forward('site/getscore'); ?
Controller should not have business logic, they need only for request->response.
You need to use models or same classes and there you can use:
Yii::app()->controller->renderPartial('/site/getscore', array('data'=>$data));

lysenkobv
  • 566
  • 2
  • 5
  • 20