yii framework calling controller method from extension php file -
i want call controller method yii extension in specific condition trigger partial render
<?php require_once (yii::app ()->basepath . '/controllers/sitecontroller.php'; $obj = new sitecontroller(); $obj->actiongetscore(); print_r($obj); ..... ..... ?>
yii::app()->controller->actiongetscore(); ?
yii::app()->controller->renderpartial(); ?
yii::app()->controller->forward('site/getscore'); ?
controller should not have business logic, need request->response.
you need use models or same classes , there can use:yii::app()->controller->renderpartial('/site/getscore', array('data'=>$data));
Comments
Post a Comment